Interface IPObjectFactory
- All Superinterfaces:
ITypedWrapperFactory
- All Known Implementing Classes:
DefaultPObjectFactory
-
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.Methods inherited from interface com.polarion.platform.persistence.model.ITypedWrapperFactory
getCommonSuperclass
-
Method Details
-
createObjectForURI
Creates 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.- Parameters:
uri
-persistence
-- Returns:
- The IPObject implementing the model-specific interface (if
specified) or just a generic
IPObject
if none specified.
-
createObjectForDAO
IPObject createObjectForDAO(com.polarion.subterra.base.data.object.IDataObject dao, IDataService persistence) Creates 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.- Parameters:
dao
-persistence
-- Returns:
- The IPObject implementing the model-specific interface (if
specified) or just a generic
IPObject
if none specified.
-
createNewObject
Creates instance of correct type, which is not persistent yet. (temporary object). Used during the creation process.- Parameters:
prototype
-persistence
-- Returns:
- the
IPObject
instance created
-