public static Object buildId(Object item, Object postfix, boolean usePrefix) {
        Object pf;
        Object key = null;
        String prefix;
        if (postfix == null) {
            pf = "";
        } else {
            pf = "-" + postfix;
        }
        if (item instanceof TestCase) {
            TestCase tc = (TestCase) item;
            prefix = "tc";
            key = (usePrefix ? prefix + "-" : "") + tc.getTestCasePK().getId()
                    + "-" + tc.getTestCasePK().getTestCaseTypeId()
                    + pf;
        } else if (item instanceof Requirement) {
            Requirement r = (Requirement) item;
            key = r.getUniqueId() + pf;
        } else if (item instanceof ExecutionStep) {
            ExecutionStep es = (ExecutionStep) item;
            prefix = "es";
            key = (usePrefix ? prefix + "-" : "")
                    + es.getExecutionStepPK().getStepId() + "-"
                    + es.getExecutionStepPK().getStepTestCaseId() + "-"
                    + es.getExecutionStepPK().getTestCaseExecutionId() + pf;
        } else if (item instanceof Issue) {
            Issue issue = (Issue) item;
            prefix = "issue";
            key = (usePrefix ? prefix + "-" : "") + issue.getIssuePK().getId() + pf;
        } else if (item instanceof TestCaseExecution) {
            TestCaseExecution tce = (TestCaseExecution) item;
            prefix = "tce";
            key = (usePrefix ? prefix + "-" : "") + tce.getId() + pf;
        }
        return key;
    }
public static Object buildId(Object item, Object postfix, boolean usePrefix) {
        Object pf;
        Object key = null;
        String prefix;
        if (postfix == null) {
            pf = "";
        } else {
            pf = "-" + postfix;
        }
        if (item instanceof TestCase) {
            TestCase tc = (TestCase) item;
            prefix = "tc";
            key = (usePrefix ? prefix + "-" : "") + tc.getTestCasePK().getId()
                    + "-" + tc.getTestCasePK().getTestCaseTypeId()
                    + pf;
        } else if (item instanceof Requirement) {
            Requirement r = (Requirement) item;
            key = r.getUniqueId() + pf;
        } else if (item instanceof ExecutionStep) {
            ExecutionStep es = (ExecutionStep) item;
            prefix = "es";
            key = (usePrefix ? prefix + "-" : "")
                    + es.getExecutionStepPK().getStepId() + "-"
                    + es.getExecutionStepPK().getStepTestCaseId() + "-"
                    + es.getExecutionStepPK().getTestCaseExecutionId() + pf;
        } else if (item instanceof Issue) {
            Issue issue = (Issue) item;
            prefix = "issue";
            key = (usePrefix ? prefix + "-" : "") + issue.getIssuePK().getId() + pf;
        } else if (item instanceof TestCaseExecution) {
            TestCaseExecution tce = (TestCaseExecution) item;
            prefix = "tce";
            key = (usePrefix ? prefix + "-" : "") + tce.getId() + pf;
        }
        return key;
    }
public static Object buildId ( Object item , Object postfix , boolean usePrefix ) { Object pf ; Object key = null ; String prefix ; if ( postfix == null ) { pf = "" ; } else { pf = "-" + postfix ; } if ( item instanceof TestCase ) { TestCase tc = ( TestCase ) item ; prefix = "tc" ; key = ( usePrefix ? prefix + "-" : "" ) + tc . getTestCasePK ( ) . getId ( ) + "-" + tc . getTestCasePK ( ) . getTestCaseTypeId ( ) + pf ; } else if ( item instanceof Requirement ) { Requirement r = ( Requirement ) item ; key = r . getUniqueId ( ) + pf ; } else if ( item instanceof ExecutionStep ) { ExecutionStep es = ( ExecutionStep ) item ; prefix = "es" ; key = ( usePrefix ? prefix + "-" : "" ) + es . getExecutionStepPK ( ) . getStepId ( ) + "-" + es . getExecutionStepPK ( ) . getStepTestCaseId ( ) + "-" + es . getExecutionStepPK ( ) . getTestCaseExecutionId ( ) + pf ; } else if ( item instanceof Issue ) { Issue issue = ( Issue ) item ; prefix = "issue" ; key = ( usePrefix ? prefix + "-" : "" ) + issue . getIssuePK ( ) . getId ( ) + pf ; } else if ( item instanceof TestCaseExecution ) { TestCaseExecution tce = ( TestCaseExecution ) item ; prefix = "tce" ; key = ( usePrefix ? prefix + "-" : "" ) + tce . getId ( ) + pf ; } return key ; }
Builder of unique id's for items.

@param item Item to get the id from
@param postfix postfix to add to the key
@param usePrefix Use the prefix?
@return key for the object
Builder of unique id s for items .