Examples of OIDMapping


Examples of org.datanucleus.store.mapped.mapping.OIDMapping

     * @param cmd The MetaData for the class
     */
    void addDatastoreId(ColumnMetaDataContainer columnContainer, DatastoreClass refTable, AbstractClassMetaData cmd)
    {
        // Create the mapping, setting its table
        datastoreIDMapping = new OIDMapping();
        datastoreIDMapping.setDatastoreContainer(this);
        datastoreIDMapping.initialize(storeMgr, cmd.getFullClassName());

        // Create a ColumnMetaData in the container if none is defined
        ColumnMetaData colmd = null;
View Full Code Here

Examples of org.datanucleus.store.mapped.mapping.OIDMapping

    return null;
  }

  void addDatastoreId(ColumnMetaData columnMetaData, DatastoreClass refTable,
      AbstractClassMetaData cmd) {
    datastoreIDMapping = new OIDMapping();
    datastoreIDMapping.initialize(storeMgr, cmd.getFullClassName());

    // Create a ColumnMetaData in the container if none is defined
    ColumnMetaData colmd;
    if (columnMetaData == null) {
View Full Code Here

Examples of org.datanucleus.store.mapped.mapping.OIDMapping

    return null;
  }

  void addDatastoreId(ColumnMetaDataContainer columnContainer, DatastoreClass refTable,
      AbstractClassMetaData cmd) {
    datastoreIDMapping = new OIDMapping();
    datastoreIDMapping.initialize(dba, cmd.getFullClassName());

    // Create a ColumnMetaData in the container if none is defined
    ColumnMetaData colmd;
    if (columnContainer == null) {
View Full Code Here

Examples of org.jpox.store.mapped.mapping.OIDMapping

     * @param refTable Table used as a reference (if any)
     * @param cmd The MetaData for the class
     */
    void addDatastoreId(ColumnMetaDataContainer columnContainer, DatastoreClass refTable, AbstractClassMetaData cmd)
    {
        datastoreIDMapping = new OIDMapping();
        datastoreIDMapping.initialize(dba, cmd.getFullClassName());

        // Create a ColumnMetaData in the container if none is defined
        ColumnMetaData colmd = null;
        if (columnContainer == null)
View Full Code Here

Examples of org.jpox.store.mapped.mapping.OIDMapping

        {
            obj = getObjectByAID(om, (ResultSet)rs, fieldNumbers, cmd, pcClassForObject, requiresInheritanceCheck);
        }
        else if (cmd.getIdentityType() == IdentityType.DATASTORE)
        {
            JavaTypeMapping mapping = new OIDMapping();
            mapping.initialize(table.getStoreManager().getDatastoreAdapter(), pcClassForObject.getName());
            mapping.addDataStoreMapping(table.getDataStoreObjectIdMapping().getDataStoreMapping(0));
            Object id = mapping.getObject(om, rs, datastoreIdentityExpressionIndex);
            if (fieldNumbers == null)
            {
                obj = om.findObject(id, false, requiresInheritanceCheck, null);
            }
            else
            {
              if (requiresInheritanceCheck)
              {
                    obj = getObjectById(om, (ResultSet)rs, fieldNumbers, cmd, id, null);
              }
              else
              {
                obj = getObjectById(om, (ResultSet)rs, fieldNumbers, cmd, id, pcClassForObject);
              }
            }
        }
        else if (cmd.getIdentityType() == IdentityType.NONDURABLE)
        {
            Object id = om.newObjectId(className, null);
            if (fieldNumbers == null)
            {
                obj = om.findObject(id, false, requiresInheritanceCheck, null);
            }
            else
            {
                obj = getObjectById(om, (ResultSet)rs, fieldNumbers, cmd, id, pcClassForObject);
            }
        }

        // Set the version of the object where possible
        int versionFieldNumber = -1;
        VersionMetaData vermd = table.getVersionMetaData();
        if (vermd != null && vermd.getFieldName() != null)
        {
            // Version stored in a normal field
            // TODO Should only do this if the version was just retrieved
            versionFieldNumber = acmd.getMetaDataForMember(vermd.getFieldName()).getAbsoluteFieldNumber();
            StateManager objSM = om.findStateManager(obj);
            Object verFieldValue = objSM.provideField(versionFieldNumber);
            if (verFieldValue != null)
            {
                objSM.setVersion(verFieldValue);
            }
        }

        if (versionIndex != null)
        {
            // Surrogate version column returned by query
            JavaTypeMapping mapping = table.getVersionMapping(true);
            Object version = mapping.getObject(om, rs, versionIndex);
            StateManager objSM = om.findStateManager(obj);
            objSM.setVersion(version);
        }

        return obj;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.