Class DefaultPObjectFactory
java.lang.Object
com.polarion.platform.persistence.spi.DefaultPObjectFactory
- All Implemented Interfaces:
IPObjectFactory,ITypedWrapperFactory
- Author:
- dobisekm
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateNewObject(IPrototype prototype, IDataService persistence) Creates instance of correct type, which is not persistent yet.createObjectForDAO(com.polarion.subterra.base.data.object.IDataObject dao, IDataService persistence) Creates instance of the correct type, wrapping the given data object.createObjectForURI(SubterraURI uri, IDataService persistence) Creates instance of the correct type for the given URI.
-
Constructor Details
-
DefaultPObjectFactory
public DefaultPObjectFactory()
-
-
Method Details
-
createObjectForURI
Description copied from interface:IPObjectFactoryCreates instance of the correct type for the given URI. Implementors of this method do not need to perform checks for URI correctness, since this should be performed by the calling framework.- Specified by:
createObjectForURIin interfaceIPObjectFactory- Returns:
- The IPObject implementing the model-specific interface (if
specified) or just a generic
IPObjectif none specified.
-
createObjectForDAO
public IPObject createObjectForDAO(com.polarion.subterra.base.data.object.IDataObject dao, IDataService persistence) Description copied from interface:IPObjectFactoryCreates instance of the correct type, wrapping the given data object. Implementors of this method do not need to perform checks for URI correctness, since this should be performed by the calling framework.- Specified by:
createObjectForDAOin interfaceIPObjectFactory- Returns:
- The IPObject implementing the model-specific interface (if
specified) or just a generic
IPObjectif none specified.
-
createNewObject
Description copied from interface:IPObjectFactoryCreates instance of correct type, which is not persistent yet. (temporary object). Used during the creation process.- Specified by:
createNewObjectin interfaceIPObjectFactory- Returns:
- the
IPObjectinstance created
-
getCommonSuperclass
- Specified by:
getCommonSuperclassin interfaceITypedWrapperFactory- Returns:
- The interface implemented by all instances created by this
factory.
The returned class must follow the inheritance structure from the model. Therefore the returned class must also be instanceof of the classes returned by their supertype factories (applies to
IPObjectwrappers only.
-