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

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

Introduction

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

Prototype

public Object put(Object key, Object value) 

Source Link

Document

Puts a key-value mapping into this map.

Usage

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

/**
 * Creates an instance of TLocked with the contents
 * of a TLockedBean.//from   ww  w. 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 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 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 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 2 s.c  om*/
 * 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  ww w . j a v a  2 s  .  c  om
 * 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  . j a v  a  2  s. c om*/
 * 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  ww .  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 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./*  w  ww .ja  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 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./*  w ww .  j a  v a  2  s .  c  om*/
 * 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.//from   w w  w  .  j a  va2  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.BaseTViewParam.java

/**
 * Creates an instance of TViewParam with the contents
 * of a TViewParamBean./*www.  java 2 s . c  om*/
 * 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 TViewParamBean which contents are used to create
 *        the resulting class
 * @param createdObjects a IdentityMap which maps beans
 *        to already created objects
 * @return an instance of TViewParam with the contents of bean
 */

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

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

    {
        TNavigatorLayoutBean relatedBean = bean.getTNavigatorLayoutBean();
        if (relatedBean != null) {
            TNavigatorLayout relatedObject = TNavigatorLayout.createTNavigatorLayout(relatedBean,
                    createdObjects);
            result.setTNavigatorLayout(relatedObject);
        }
    }
    result.setModified(bean.isModified());
    result.setNew(bean.isNew());
    return result;
}