Example usage for org.apache.commons.collections.map IdentityMap get

List of usage examples for org.apache.commons.collections.map IdentityMap get

Introduction

In this page you can find the example usage for org.apache.commons.collections.map IdentityMap get.

Prototype

public Object get(Object key) 

Source Link

Document

Gets the value mapped to the key specified.

Usage

From source file:com.aurel.track.persist.BaseTLocked.java

/**
 * Creates an instance of TLocked with the contents
 * of a TLockedBean.//from   w  ww . ja v  a2  s. com
 * This behaviour could have also been achieved using a constructor,
 * however as this class is abstract no constructors are allowed.
 *
 * This method is intended for internal use only.
 * @param bean the TLockedBean which contents are used to create
 *        the resulting class
 * @param createdObjects a IdentityMap which maps beans
 *        to already created objects
 * @return an instance of TLocked with the contents of bean
 */

public static TLocked createTLocked(TLockedBean bean, IdentityMap createdObjects) throws TorqueException {
    TLocked result = (TLocked) createdObjects.get(bean);
    if (result != null) {
        // we already have an object for the bean, return it
        return result;
    }
    result = new TLocked();
    createdObjects.put(bean, result);

    result.setObjectID(bean.getObjectID());
    result.setWorkItem(bean.getWorkItem());
    result.setPerson(bean.getPerson());
    result.setHttpSession(bean.getHttpSession());

    result.setModified(bean.isModified());
    result.setNew(bean.isNew());
    return result;
}

From source file:com.aurel.track.persist.BaseTLoggingLevel.java

/**
 * Creates an instance of TLoggingLevel with the contents
 * of a TLoggingLevelBean./*from w w  w .  j  a v  a 2 s.c o m*/
 * This behaviour could have also been achieved using a constructor,
 * however as this class is abstract no constructors are allowed.
 *
 * This method is intended for internal use only.
 * @param bean the TLoggingLevelBean which contents are used to create
 *        the resulting class
 * @param createdObjects a IdentityMap which maps beans
 *        to already created objects
 * @return an instance of TLoggingLevel with the contents of bean
 */

public static TLoggingLevel createTLoggingLevel(TLoggingLevelBean bean, IdentityMap createdObjects)
        throws TorqueException {
    TLoggingLevel result = (TLoggingLevel) createdObjects.get(bean);
    if (result != null) {
        // we already have an object for the bean, return it
        return result;
    }
    result = new TLoggingLevel();
    createdObjects.put(bean, result);

    result.setObjectID(bean.getObjectID());
    result.setTheClassName(bean.getTheClassName());
    result.setLogLevel(bean.getLogLevel());
    result.setUuid(bean.getUuid());

    result.setModified(bean.isModified());
    result.setNew(bean.isNew());
    return result;
}

From source file:com.aurel.track.persist.BaseTGeneralParam.java

/**
 * Creates an instance of TGeneralParam with the contents
 * of a TGeneralParamBean.//w  w  w.j a v a 2s  .  c  o m
 * This behaviour could have also been achieved using a constructor,
 * however as this class is abstract no constructors are allowed.
 *
 * This method is intended for internal use only.
 * @param bean the TGeneralParamBean which contents are used to create
 *        the resulting class
 * @param createdObjects a IdentityMap which maps beans
 *        to already created objects
 * @return an instance of TGeneralParam with the contents of bean
 */

public static TGeneralParam createTGeneralParam(TGeneralParamBean bean, IdentityMap createdObjects)
        throws TorqueException {
    TGeneralParam result = (TGeneralParam) createdObjects.get(bean);
    if (result != null) {
        // we already have an object for the bean, return it
        return result;
    }
    result = new TGeneralParam();
    createdObjects.put(bean, result);

    result.setObjectID(bean.getObjectID());
    result.setParamName(bean.getParamName());
    result.setParamValue(bean.getParamValue());
    result.setUuid(bean.getUuid());

    result.setModified(bean.isModified());
    result.setNew(bean.isNew());
    return result;
}

From source file:com.aurel.track.persist.BaseTGlobalCssStyle.java

/**
 * Creates an instance of TGlobalCssStyle with the contents
 * of a TGlobalCssStyleBean.//from  w  ww . ja v a2 s  . co  m
 * This behaviour could have also been achieved using a constructor,
 * however as this class is abstract no constructors are allowed.
 *
 * This method is intended for internal use only.
 * @param bean the TGlobalCssStyleBean which contents are used to create
 *        the resulting class
 * @param createdObjects a IdentityMap which maps beans
 *        to already created objects
 * @return an instance of TGlobalCssStyle with the contents of bean
 */

public static TGlobalCssStyle createTGlobalCssStyle(TGlobalCssStyleBean bean, IdentityMap createdObjects)
        throws TorqueException {
    TGlobalCssStyle result = (TGlobalCssStyle) createdObjects.get(bean);
    if (result != null) {
        // we already have an object for the bean, return it
        return result;
    }
    result = new TGlobalCssStyle();
    createdObjects.put(bean, result);

    result.setObjectID(bean.getObjectID());
    result.setStyleFor(bean.getStyleFor());
    result.setCSSStyle(bean.getCSSStyle());
    result.setUuid(bean.getUuid());

    result.setModified(bean.isModified());
    result.setNew(bean.isNew());
    return result;
}

From source file:com.aurel.track.persist.BaseTMotd.java

/**
 * Creates an instance of TMotd with the contents
 * of a TMotdBean./*w w  w  . ja v  a2s .com*/
 * This behaviour could have also been achieved using a constructor,
 * however as this class is abstract no constructors are allowed.
 *
 * This method is intended for internal use only.
 * @param bean the TMotdBean which contents are used to create
 *        the resulting class
 * @param createdObjects a IdentityMap which maps beans
 *        to already created objects
 * @return an instance of TMotd with the contents of bean
 */

public static TMotd createTMotd(TMotdBean bean, IdentityMap createdObjects) throws TorqueException {
    TMotd result = (TMotd) createdObjects.get(bean);
    if (result != null) {
        // we already have an object for the bean, return it
        return result;
    }
    result = new TMotd();
    createdObjects.put(bean, result);

    result.setObjectID(bean.getObjectID());
    result.setTheLocale(bean.getTheLocale());
    result.setTheMessage(bean.getTheMessage());
    result.setTeaserText(bean.getTeaserText());
    result.setUuid(bean.getUuid());

    result.setModified(bean.isModified());
    result.setNew(bean.isNew());
    return result;
}

From source file:com.aurel.track.persist.BaseTEmailProcessed.java

/**
 * Creates an instance of TEmailProcessed with the contents
 * of a TEmailProcessedBean./*from w  w w  .  j a v  a  2s.com*/
 * This behaviour could have also been achieved using a constructor,
 * however as this class is abstract no constructors are allowed.
 *
 * This method is intended for internal use only.
 * @param bean the TEmailProcessedBean which contents are used to create
 *        the resulting class
 * @param createdObjects a IdentityMap which maps beans
 *        to already created objects
 * @return an instance of TEmailProcessed with the contents of bean
 */

public static TEmailProcessed createTEmailProcessed(TEmailProcessedBean bean, IdentityMap createdObjects)
        throws TorqueException {
    TEmailProcessed result = (TEmailProcessed) createdObjects.get(bean);
    if (result != null) {
        // we already have an object for the bean, return it
        return result;
    }
    result = new TEmailProcessed();
    createdObjects.put(bean, result);

    result.setObjectID(bean.getObjectID());
    result.setProcessedDate(bean.getProcessedDate());
    result.setMessageUID(bean.getMessageUID());
    result.setReceivedAt(bean.getReceivedAt());
    result.setUuid(bean.getUuid());

    result.setModified(bean.isModified());
    result.setNew(bean.isNew());
    return result;
}

From source file:com.aurel.track.persist.BaseTRevisionWorkitems.java

/**
 * Creates an instance of TRevisionWorkitems with the contents
 * of a TRevisionWorkitemsBean.//from w  ww .  j a v a2 s.  c  o m
 * This behaviour could have also been achieved using a constructor,
 * however as this class is abstract no constructors are allowed.
 *
 * This method is intended for internal use only.
 * @param bean the TRevisionWorkitemsBean which contents are used to create
 *        the resulting class
 * @param createdObjects a IdentityMap which maps beans
 *        to already created objects
 * @return an instance of TRevisionWorkitems with the contents of bean
 */

public static TRevisionWorkitems createTRevisionWorkitems(TRevisionWorkitemsBean bean,
        IdentityMap createdObjects) throws TorqueException {
    TRevisionWorkitems result = (TRevisionWorkitems) createdObjects.get(bean);
    if (result != null) {
        // we already have an object for the bean, return it
        return result;
    }
    result = new TRevisionWorkitems();
    createdObjects.put(bean, result);

    result.setObjectID(bean.getObjectID());
    result.setWorkItemID(bean.getWorkItemID());
    result.setRevisionKey(bean.getRevisionKey());
    result.setUuid(bean.getUuid());

    {
        TRevisionBean relatedBean = bean.getTRevisionBean();
        if (relatedBean != null) {
            TRevision relatedObject = TRevision.createTRevision(relatedBean, createdObjects);
            result.setTRevision(relatedObject);
        }
    }
    result.setModified(bean.isModified());
    result.setNew(bean.isNew());
    return result;
}

From source file:com.aurel.track.persist.BaseTApplicationContext.java

/**
 * Creates an instance of TApplicationContext with the contents
 * of a TApplicationContextBean.//from  w  w  w . ja  va  2 s .co  m
 * This behaviour could have also been achieved using a constructor,
 * however as this class is abstract no constructors are allowed.
 *
 * This method is intended for internal use only.
 * @param bean the TApplicationContextBean which contents are used to create
 *        the resulting class
 * @param createdObjects a IdentityMap which maps beans
 *        to already created objects
 * @return an instance of TApplicationContext with the contents of bean
 */

public static TApplicationContext createTApplicationContext(TApplicationContextBean bean,
        IdentityMap createdObjects) throws TorqueException {
    TApplicationContext result = (TApplicationContext) createdObjects.get(bean);
    if (result != null) {
        // we already have an object for the bean, return it
        return result;
    }
    result = new TApplicationContext();
    createdObjects.put(bean, result);

    result.setObjectID(bean.getObjectID());
    result.setLoggedFullUsers(bean.getLoggedFullUsers());
    result.setLoggedLimitedUsers(bean.getLoggedLimitedUsers());
    result.setRefreshConfiguration(bean.getRefreshConfiguration());
    result.setFirstTime(bean.getFirstTime());
    result.setMoreProps(bean.getMoreProps());

    result.setModified(bean.isModified());
    result.setNew(bean.isNew());
    return result;
}

From source file:com.aurel.track.persist.BaseTRoleField.java

/**
 * Creates an instance of TRoleField with the contents
 * of a TRoleFieldBean./*  www.ja v  a 2 s  . co  m*/
 * This behaviour could have also been achieved using a constructor,
 * however as this class is abstract no constructors are allowed.
 *
 * This method is intended for internal use only.
 * @param bean the TRoleFieldBean which contents are used to create
 *        the resulting class
 * @param createdObjects a IdentityMap which maps beans
 *        to already created objects
 * @return an instance of TRoleField with the contents of bean
 */

public static TRoleField createTRoleField(TRoleFieldBean bean, IdentityMap createdObjects)
        throws TorqueException {
    TRoleField result = (TRoleField) createdObjects.get(bean);
    if (result != null) {
        // we already have an object for the bean, return it
        return result;
    }
    result = new TRoleField();
    createdObjects.put(bean, result);

    result.setObjectID(bean.getObjectID());
    result.setRoleKey(bean.getRoleKey());
    result.setFieldKey(bean.getFieldKey());
    result.setAccessRight(bean.getAccessRight());
    result.setUuid(bean.getUuid());

    {
        TRoleBean relatedBean = bean.getTRoleBean();
        if (relatedBean != null) {
            TRole relatedObject = TRole.createTRole(relatedBean, createdObjects);
            result.setTRole(relatedObject);
        }
    }
    result.setModified(bean.isModified());
    result.setNew(bean.isNew());
    return result;
}

From source file:com.aurel.track.persist.BaseTProjectAccount.java

/**
 * Creates an instance of TProjectAccount with the contents
 * of a TProjectAccountBean.// w w  w.  j a  v a  2  s  .c  o m
 * This behaviour could have also been achieved using a constructor,
 * however as this class is abstract no constructors are allowed.
 *
 * This method is intended for internal use only.
 * @param bean the TProjectAccountBean which contents are used to create
 *        the resulting class
 * @param createdObjects a IdentityMap which maps beans
 *        to already created objects
 * @return an instance of TProjectAccount with the contents of bean
 */

public static TProjectAccount createTProjectAccount(TProjectAccountBean bean, IdentityMap createdObjects)
        throws TorqueException {
    TProjectAccount result = (TProjectAccount) createdObjects.get(bean);
    if (result != null) {
        // we already have an object for the bean, return it
        return result;
    }
    result = new TProjectAccount();
    createdObjects.put(bean, result);

    result.setAccount(bean.getAccount());
    result.setProject(bean.getProject());
    result.setUuid(bean.getUuid());

    {
        TProjectBean relatedBean = bean.getTProjectBean();
        if (relatedBean != null) {
            TProject relatedObject = TProject.createTProject(relatedBean, createdObjects);
            result.setTProject(relatedObject);
        }
    }

    {
        TAccountBean relatedBean = bean.getTAccountBean();
        if (relatedBean != null) {
            TAccount relatedObject = TAccount.createTAccount(relatedBean, createdObjects);
            result.setTAccount(relatedObject);
        }
    }
    result.setModified(bean.isModified());
    result.setNew(bean.isNew());
    return result;
}