com.ibm.commerce.foundation.server.services.dataaccess
Class PhysicalDataContainerImpl
- java.lang.Object
-
- com.ibm.commerce.foundation.server.services.dataaccess.PhysicalDataContainerImpl
-
- All Implemented Interfaces:
- PhysicalDataContainer
public class PhysicalDataContainerImpl extends java.lang.Object implements PhysicalDataContainer
This is an implementation for the physical data container that is used to perform CRUD operations on the physical entities.
-
-
Constructor Summary
Constructors Constructor and Description PhysicalDataContainerImpl(java.lang.String componentId, EntityContainer anEntityContainer, com.ibm.commerce.foundation.internal.server.services.dataaccess.datamediator.DataMediator aDataMediator, KeyManager aKeyManager)
Creates a new physical data container
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.lang.Object
createPhysicalObject(java.lang.Object owningObject, java.lang.Class objectClass)
Creates a physical entity of the specified entity classEntityContainer
getEntityContainer()
This method returns the entity container associated with this physical data container.java.lang.Long
getNextPrimaryKey(java.lang.Class aClass)
Gets the unique key for a database table represented by the given class (the mapping between the physical table name and class name is defined by the object-relational mapping).boolean
getPagingRecordSetCompleteIndicator()
(non-Javadoc)java.math.BigInteger
getPagingRecordSetCount()
Returns the number of records from the query result set returned by this request.java.lang.String
getPagingRecordSetReferenceId()
(non-Javadoc)java.math.BigInteger
getPagingRecordSetStartNumber()
(non-Javadoc)java.math.BigInteger
getPagingTotal()
(non-Javadoc)java.util.List
getPhysicalObjects()
Gets the physical objectsvoid
removePhysicalObject(java.lang.Object entityObject)
Removes the physical object from the objects associated with the container.void
save()
This method applies all the changes made to the entity objects stored by this physical data container.
-
-
-
Constructor Detail
-
PhysicalDataContainerImpl
public PhysicalDataContainerImpl(java.lang.String componentId, EntityContainer anEntityContainer, com.ibm.commerce.foundation.internal.server.services.dataaccess.datamediator.DataMediator aDataMediator, KeyManager aKeyManager)
Creates a new physical data container- Parameters:
componentId
- The component id.anEntityContainer
- The entity container which contains physical SDO.aDataMediator
- An instance object of DataMediator for the current data mediator the caller is using.aKeyManager
- The instance object of KeyManager
-
-
Method Detail
-
getPhysicalObjects
public java.util.List getPhysicalObjects()
Gets the physical objects- Specified by:
getPhysicalObjects
in interfacePhysicalDataContainer
- Returns:
- The physical objects
-
createPhysicalObject
public java.lang.Object createPhysicalObject(java.lang.Object owningObject, java.lang.Class objectClass)
Creates a physical entity of the specified entity class- Specified by:
createPhysicalObject
in interfacePhysicalDataContainer
- Parameters:
owningObject
- The parent physical entityobjectClass
- The entity class- Returns:
- The physical entity
-
removePhysicalObject
public void removePhysicalObject(java.lang.Object entityObject)
Removes the physical object from the objects associated with the container. The change will be persisted upon save.- Specified by:
removePhysicalObject
in interfacePhysicalDataContainer
- Parameters:
entityObject
- The entity object to be removed.
-
save
public void save()
This method applies all the changes made to the entity objects stored by this physical data container.- Specified by:
save
in interfacePhysicalDataContainer
-
getNextPrimaryKey
public java.lang.Long getNextPrimaryKey(java.lang.Class aClass)
Gets the unique key for a database table represented by the given class (the mapping between the physical table name and class name is defined by the object-relational mapping).- Specified by:
getNextPrimaryKey
in interfacePhysicalDataContainer
- Parameters:
aClass
- - class representing the physical table- Returns:
- The value of unique key
-
getPagingTotal
public java.math.BigInteger getPagingTotal()
(non-Javadoc)- Specified by:
getPagingTotal
in interfacePhysicalDataContainer
- Returns:
- the total number of the physical objects
- See Also:
PhysicalDataContainer.getPagingTotal()
-
getPagingRecordSetCompleteIndicator
public boolean getPagingRecordSetCompleteIndicator()
(non-Javadoc)- Specified by:
getPagingRecordSetCompleteIndicator
in interfacePhysicalDataContainer
- Returns:
- 'true' if it is the last page, 'false' if there are more pages.
- See Also:
PhysicalDataContainer.getPagingRecordSetCompleteIndicator()
-
getPagingRecordSetReferenceId
public java.lang.String getPagingRecordSetReferenceId()
(non-Javadoc)- Specified by:
getPagingRecordSetReferenceId
in interfacePhysicalDataContainer
- Returns:
- the reference id of the paging record set
- See Also:
PhysicalDataContainer.getPagingRecordSetReferenceId()
-
getPagingRecordSetStartNumber
public java.math.BigInteger getPagingRecordSetStartNumber()
(non-Javadoc)- Specified by:
getPagingRecordSetStartNumber
in interfacePhysicalDataContainer
- Returns:
- The index of the first record to be returned
- See Also:
PhysicalDataContainer.getPagingRecordSetStartNumber()
-
getPagingRecordSetCount
public java.math.BigInteger getPagingRecordSetCount()
Returns the number of records from the query result set returned by this request.- Specified by:
getPagingRecordSetCount
in interfacePhysicalDataContainer
- Returns:
- number of records from the result set.
-
getEntityContainer
public EntityContainer getEntityContainer()
This method returns the entity container associated with this physical data container.
- Returns:
- EntityContainer The entity container associated with this physical data container.
-
-