Class TypeManagerEJB
java.lang.Object
de.hybris.platform.persistence.ManagerEJB
de.hybris.platform.persistence.type.TypeManagerEJB
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ListcalculateSubAttributeInheritancePath(ComposedTypeRemote newEnclosingType, AttributeDescriptorRemote superAttribute) protected ListcalculateSubAttributeInheritancePath(ComposedTypeRemote newEnclosingType, ComposedTypeRemote superEnclosingType) booleancanRemoveItem(ItemRemote item) In case a manager wants to abort the removal of an Item this method should return false.voidchangeItemType(ItemRemote item, ComposedTypeRemote newType) voidconnectRelation(String relName, boolean localized, ComposedTypeRemote relType, AttributeDescriptorRemote sourceFD, AttributeDescriptorRemote targetFD, AttributeDescriptorRemote orderingFD, AttributeDescriptorRemote locFD) protected voidcopyDownParentAttributeDescriptor(ComposedTypeRemote newType, AttributeDescriptorRemote parentDescriptor) protected voidcopySuperTypeData(HierarchieTypeRemote type, HierarchieTypeRemote newSuperType) createAtomicType(PK pkBase, AtomicTypeRemote superType, Class javaClass) createAtomicType(PK pkBase, AtomicTypeRemote superType, String code) createAtomicType(PK pkBase, Class javaClass) createAttributeDescriptor(PK pkBase, ComposedTypeRemote enclosingType, String qualifier, String persistenceQualifier, TypeRemote type, AtomicTypeRemote persistenceType, int modifiers, ComposedTypeRemote metaType, boolean reinitialize) createCollectionType(PK pkBase, String code, TypeRemote elementType) createCollectionType(PK pkBase, String code, TypeRemote elementType, int collectionType) createMapType(PK pkBase, String code, TypeRemote argumentType, TypeRemote returnType) createNonRootComposedType(PK pkBase, ComposedTypeRemote superType, String code, String jaloClassName, ComposedTypeRemote metaType, boolean copySupertypeData) createPropertyDescriptor(PK pkBase, ComposedTypeRemote enclosingType, String qualifier, TypeRemote type, int modifiers, ComposedTypeRemote metaType, Map sqlColumnDefs, boolean reinitialize) createPropertyDescriptor(PK pkBase, ComposedTypeRemote enclosingType, String qualifier, TypeRemote type, int modifiers, ComposedTypeRemote metaType, Map sqlColumnDefs, boolean reinitialize, String realColumnName) createPropertyRelationDescriptor(String qualifier, ComposedTypeRemote enclosingType, ComposedTypeRemote type, int modifiers, boolean reinit) Deprecated, for removal: This API element is subject to removal in a future version.createRelationDescriptor(PK pkBase, String relationName, String qualifier, ComposedTypeRemote enclosingType, ComposedTypeRemote type, int modifiers, boolean localized, boolean reinit, int typeOfCollection) createRelationType(PK pkBase, String relationName, boolean copySupertypeData, boolean isAbstract) createRelationType(PK pkBase, String relationQualfier, boolean localized, AttributeDescriptorRemote sourceFD, AttributeDescriptorRemote targetFD) createRootComposedType(PK pkBase, ComposedTypeRemote superType, String code, String jaloClassName, ItemDeployment deployment, ComposedTypeRemote metaType, boolean copySupertypeData) createRootRelationType(PK pkBase, String relationQualfier, ItemDeployment deployment, boolean copySupertypeData) Deprecated, for removal: This API element is subject to removal in a future version.getAllAttributeDescriptors(ComposedTypeRemote enclosingType) protected SetgetAllAttributeDescriptorsInternal(ComposedTypeRemote enclosingType) Set<? extends AttributeDescriptorRemote>getAtomicTypesForJavaClass(Class javaClass) getAttributeDescriptor(ComposedTypeRemote enclosingType, String qualifier) getAttributeDescriptors(ComposedTypeRemote enclosingType, boolean includePrivate) protected SetgetAttributeDescriptorsByInheritancePathString(String qualifier, String inheritancePathString) getCollectionTypeNoCreate(String relationName, String qualifier) Deprecated, for removal: This API element is subject to removal in a future version.getComposedType(String code) getDeclaredAttributeDescriptor(ComposedTypeRemote enclosingType, String qualifier) getDeclaredAttributeDescriptors(ComposedTypeRemote enclosingType) protected SetgetDeclaredAttributeDescriptorsInternal(ComposedTypeRemote enclosingType) getEveryAttributeDescriptor(PK enclosingTypePK, String qualifier) getEveryAttributeDescriptor(ComposedTypeRemote enclosingType, String qualifier) getInheritedAttributeDescriptors(ComposedTypeRemote enclosingType) getMapTypesByArgumentType(TypeRemote argumentType) getOrCreateAtomicType(PK pkBase, Class javaClass) getOrCreateCollectionType(PK pkBase, String code, TypeRemote elementType) getOrCreateCollectionType(PK pkBase, String code, TypeRemote elementType, int collectionType) protected MapTypeRemotegetOrCreateMapType(PK pkBase, String code, TypeRemote argumentType, TypeRemote returnType) checks if there is a maptype for a given argument type and return type.getPropertyDescriptors(String ectPK) protected ComposedTypeRemoteprotected ComposedTypeRemoteprotected ComposedTypeRemotegetRestrictions(PK principalPK, PK typePK) getRootAtomicType(Class javaClass) getRootComposedType(int typecode) getRootComposedTypeForJaloClass(String jaloClassName) intbooleanhasSameElementType(CollectionTypeRemote collType, ComposedTypeRemote newTypeDescriptor) Deprecated, for removal: This API element is subject to removal in a future version.protected booleanisInstanceOf(ItemRemote item, ComposedTypeRemote ct) booleanisLocalizationType(TypeRemote type, List context) protected booleanisNonRemovableType(TypeRemote item) protected booleanbooleanvoidnotifyItemRemove(ItemRemote item) Callback method to get notified if an item in the hybris platform is going to be removed.protected booleanvoidprepareItemRemove(ItemRemote item) Called before a not stageable item is removed.voidredeclareAttributeDescriptor(AttributeDescriptorRemote theFD, TypeRemote type, int modifiers) redeclareAttributeDescriptor(ComposedTypeRemote enclosingType, String qualifier, TypeRemote type, int modifiers) protected booleanreferencedType(TypeRemote item) voidvoidremoveItem(ItemRemote item) Removes an Item which is not stageable.protected voidvoidsetDeclaredAttributeDescriptors(ComposedTypeRemote enclosingType, Set attributeDescriptors) protected booleantypeWithSubTypes(TypeRemote item) Methods inherited from class de.hybris.platform.persistence.ManagerEJB
ejbCreate, ejbPostCreate, getPersistencePool, isReinitialization
-
Constructor Details
-
TypeManagerEJB
public TypeManagerEJB()
-
-
Method Details
-
getTypecode
public int getTypecode() -
isLocalizationType
-
changeItemType
public void changeItemType(ItemRemote item, ComposedTypeRemote newType) throws EJBInvalidParameterException - Throws:
EJBInvalidParameterException
-
getAllItemTypes
-
getAllCollectionTypes
-
getAllMapTypes
-
getAllAtomicTypes
-
getType
- Throws:
EJBItemNotFoundException
-
getType
- Throws:
EJBItemNotFoundException
-
getOrCreateAtomicType
public AtomicTypeRemote getOrCreateAtomicType(PK pkBase, Class javaClass) throws EJBInvalidParameterException - Throws:
EJBInvalidParameterException
-
getRootComposedTypeForJaloClass
public ComposedTypeRemote getRootComposedTypeForJaloClass(String jaloClassName) throws EJBItemNotFoundException - Throws:
EJBItemNotFoundException
-
getRootComposedType
- Throws:
EJBItemNotFoundException
-
getComposedType
- Throws:
EJBItemNotFoundException
-
getRootAtomicType
- Throws:
EJBItemNotFoundException
-
getProposedDatabaseColumn
-
createAtomicType
public AtomicTypeRemote createAtomicType(PK pkBase, Class javaClass) throws EJBDuplicateCodeException, EJBInvalidParameterException -
createAtomicType
public AtomicTypeRemote createAtomicType(PK pkBase, AtomicTypeRemote superType, Class javaClass) throws EJBDuplicateCodeException, EJBInvalidParameterException -
createAtomicType
public AtomicTypeRemote createAtomicType(PK pkBase, AtomicTypeRemote superType, String code) throws EJBDuplicateCodeException, EJBInvalidParameterException -
createNonRootComposedType
public ComposedTypeRemote createNonRootComposedType(PK pkBase, ComposedTypeRemote superType, String code, String jaloClassName, ComposedTypeRemote metaType, boolean copySupertypeData) throws EJBDuplicateCodeException, EJBInvalidParameterException -
createRootComposedType
public ComposedTypeRemote createRootComposedType(PK pkBase, ComposedTypeRemote superType, String code, String jaloClassName, ItemDeployment deployment, ComposedTypeRemote metaType, boolean copySupertypeData) throws EJBDuplicateCodeException, EJBInvalidParameterException -
getOrCreateCollectionType
public CollectionTypeRemote getOrCreateCollectionType(PK pkBase, String code, TypeRemote elementType) throws EJBInvalidParameterException - Throws:
EJBInvalidParameterException
-
getOrCreateCollectionType
public CollectionTypeRemote getOrCreateCollectionType(PK pkBase, String code, TypeRemote elementType, int collectionType) throws EJBInvalidParameterException - Throws:
EJBInvalidParameterException
-
getOrCreateMapType
protected MapTypeRemote getOrCreateMapType(PK pkBase, String code, TypeRemote argumentType, TypeRemote returnType) throws EJBInvalidParameterException checks if there is a maptype for a given argument type and return type. if not a new one will be created- Parameters:
code- the code of the new type if such has to be createdargumentType- the desired argument typereturnType- the desired return type- Returns:
- the map type which was found or creates
- Throws:
EJBInvalidParameterException- in case
-
createCollectionType
public CollectionTypeRemote createCollectionType(PK pkBase, String code, TypeRemote elementType) throws EJBDuplicateCodeException, EJBInvalidParameterException -
createCollectionType
public CollectionTypeRemote createCollectionType(PK pkBase, String code, TypeRemote elementType, int collectionType) throws EJBDuplicateCodeException, EJBInvalidParameterException -
createMapType
public MapTypeRemote createMapType(PK pkBase, String code, TypeRemote argumentType, TypeRemote returnType) throws EJBDuplicateCodeException, EJBInvalidParameterException -
getMapTypesByArgumentType
-
getAtomicTypesForJavaClass
-
getSubTypes
-
getAllSubTypes
-
getAllSubAttributeDescriptors
public Set<? extends AttributeDescriptorRemote> getAllSubAttributeDescriptors(AttributeDescriptorRemote fd) -
getAttributeDescriptorsByInheritancePathString
-
getDeclaredAttributeDescriptors
-
getDeclaredAttributeDescriptorsInternal
-
getInheritedAttributeDescriptors
-
setDeclaredAttributeDescriptors
public void setDeclaredAttributeDescriptors(ComposedTypeRemote enclosingType, Set attributeDescriptors) throws EJBInvalidParameterException - Throws:
EJBInvalidParameterException
-
getAttributeDescriptors
-
getDeclaredAttributeDescriptor
public AttributeDescriptorRemote getDeclaredAttributeDescriptor(ComposedTypeRemote enclosingType, String qualifier) throws EJBItemNotFoundException - Throws:
EJBItemNotFoundException
-
getAttributeDescriptor
public AttributeDescriptorRemote getAttributeDescriptor(ComposedTypeRemote enclosingType, String qualifier) throws EJBItemNotFoundException - Throws:
EJBItemNotFoundException
-
getEveryAttributeDescriptor
public AttributeDescriptorRemote getEveryAttributeDescriptor(ComposedTypeRemote enclosingType, String qualifier) throws EJBItemNotFoundException - Throws:
EJBItemNotFoundException
-
getEveryAttributeDescriptor
public AttributeDescriptorRemote getEveryAttributeDescriptor(PK enclosingTypePK, String qualifier) throws EJBItemNotFoundException - Throws:
EJBItemNotFoundException
-
getAllAttributeDescriptors
-
getAllAttributeDescriptorsInternal
-
getPropertyDescriptors
-
createAttributeDescriptor
public AttributeDescriptorRemote createAttributeDescriptor(PK pkBase, ComposedTypeRemote enclosingType, String qualifier, String persistenceQualifier, TypeRemote type, AtomicTypeRemote persistenceType, int modifiers, ComposedTypeRemote metaType, boolean reinitialize) throws EJBDuplicateQualifierException, EJBInvalidParameterException -
getAtomicTypeRepresentation
-
createPropertyDescriptor
public AttributeDescriptorRemote createPropertyDescriptor(PK pkBase, ComposedTypeRemote enclosingType, String qualifier, TypeRemote type, int modifiers, ComposedTypeRemote metaType, Map sqlColumnDefs, boolean reinitialize) throws EJBDuplicateQualifierException, EJBInvalidParameterException -
createPropertyDescriptor
public AttributeDescriptorRemote createPropertyDescriptor(PK pkBase, ComposedTypeRemote enclosingType, String qualifier, TypeRemote type, int modifiers, ComposedTypeRemote metaType, Map sqlColumnDefs, boolean reinitialize, String realColumnName) throws EJBDuplicateQualifierException, EJBInvalidParameterException -
redeclareAttributeDescriptor
public AttributeDescriptorRemote redeclareAttributeDescriptor(ComposedTypeRemote enclosingType, String qualifier, TypeRemote type, int modifiers) throws EJBInvalidParameterException, EJBItemNotFoundException -
redeclareAttributeDescriptor
public void redeclareAttributeDescriptor(AttributeDescriptorRemote theFD, TypeRemote type, int modifiers) throws EJBInvalidParameterException - Throws:
EJBInvalidParameterException
-
copyDownParentAttributeDescriptor
protected void copyDownParentAttributeDescriptor(ComposedTypeRemote newType, AttributeDescriptorRemote parentDescriptor) throws EJBDuplicateQualifierException, EJBInvalidParameterException -
calculateSubAttributeInheritancePath
protected List calculateSubAttributeInheritancePath(ComposedTypeRemote newEnclosingType, AttributeDescriptorRemote superAttribute) -
calculateSubAttributeInheritancePath
protected List calculateSubAttributeInheritancePath(ComposedTypeRemote newEnclosingType, ComposedTypeRemote superEnclosingType) -
copySuperTypeData
protected void copySuperTypeData(HierarchieTypeRemote type, HierarchieTypeRemote newSuperType) throws EJBInvalidParameterException - Throws:
EJBInvalidParameterException
-
notInstanceManagingComposedTypeWithInstances
-
isNonRemovableType
-
referencedType
-
typeWithSubTypes
-
createRelationType
public ComposedTypeRemote createRelationType(PK pkBase, String relationQualfier, boolean localized, AttributeDescriptorRemote sourceFD, AttributeDescriptorRemote targetFD) throws EJBDuplicateCodeException, EJBInvalidParameterException -
getRelationMetaType
-
getRelationDescriptorMetaType
-
isRelationDescriptor
-
getRelationRootType
-
isRelationType
-
createRelationType
public ComposedTypeRemote createRelationType(PK pkBase, String relationName, boolean copySupertypeData, boolean isAbstract) throws EJBDuplicateCodeException - Throws:
EJBDuplicateCodeException
-
createRootRelationType
@Deprecated(since="2005.0", forRemoval=true) public ComposedTypeRemote createRootRelationType(PK pkBase, String relationQualfier, ItemDeployment deployment, boolean copySupertypeData) throws EJBDuplicateCodeException, EJBInvalidParameterException Deprecated, for removal: This API element is subject to removal in a future version. -
connectRelation
public void connectRelation(String relName, boolean localized, ComposedTypeRemote relType, AttributeDescriptorRemote sourceFD, AttributeDescriptorRemote targetFD, AttributeDescriptorRemote orderingFD, AttributeDescriptorRemote locFD) -
getCollectionTypeNoCreate
@Deprecated(since="2005.0", forRemoval=true) public CollectionTypeRemote getCollectionTypeNoCreate(String relationName, String qualifier) Deprecated, for removal: This API element is subject to removal in a future version. -
hasSameElementType
@Deprecated(since="2005.0", forRemoval=true) public boolean hasSameElementType(CollectionTypeRemote collType, ComposedTypeRemote newTypeDescriptor) Deprecated, for removal: This API element is subject to removal in a future version. -
createRelationDescriptor
public AttributeDescriptorRemote createRelationDescriptor(PK pkBase, String relationName, String qualifier, ComposedTypeRemote enclosingType, ComposedTypeRemote type, int modifiers, boolean localized, boolean reinit, int typeOfCollection) throws EJBDuplicateQualifierException, EJBInvalidParameterException -
createPropertyRelationDescriptor
@Deprecated(since="2005.0", forRemoval=true) public AttributeDescriptorRemote createPropertyRelationDescriptor(String qualifier, ComposedTypeRemote enclosingType, ComposedTypeRemote type, int modifiers, boolean reinit) throws EJBDuplicateQualifierException, EJBInvalidParameterException Deprecated, for removal: This API element is subject to removal in a future version. -
createRestriction
-
getRestrictions
-
canRemoveItem
Description copied from class:ManagerEJBIn case a manager wants to abort the removal of an Item this method should return false. Since all manager are asked before you can assume that no changes are made when one manager aborts.- Overrides:
canRemoveItemin classManagerEJB- Throws:
ConsistencyCheckException- you can either throw an exception or return false
-
prepareItemRemove
Description copied from class:ManagerEJBCalled before a not stageable item is removed. This is a default implementation and can be overridden by subclasses to provide consistency checks.- Overrides:
prepareItemRemovein classManagerEJB- Throws:
ConsistencyCheckException- See Also:
-
removeItem
Description copied from class:ManagerEJBRemoves an Item which is not stageable. The following tasks are done by this method:- Check if item is stageable; if it is, throw exception (we can
- call
ManagerEJB.prepareItemRemove(ItemRemote) - Depending on the given stagingMethod do:
Productive Stage - Remove staged copy (item.getStagedCopy()) of item, if it exist
- call NotifyManager.notifyItemRemove( item )
- Remove the entity
- Remove staged copy (item.getStagedCopy()) of item, if it exist
- Mark item as removed (item.setRemoved(true)
- Overrides:
removeItemin classManagerEJB- Throws:
ConsistencyCheckException- See Also:
-
notifyItemRemove
Description copied from class:ManagerEJBCallback method to get notified if an item in the hybris platform is going to be removed.
Each manager can perform some cleanups.
It is a major failure to throw an exception here to abort item removal; useManagerEJB.canRemoveItem(ItemRemote)instead to signal your veto.- Overrides:
notifyItemRemovein classManagerEJB
-
isInstanceOf
-
removeRelationDescriptor
protected void removeRelationDescriptor(AttributeDescriptorRemote fd) throws ConsistencyCheckException - Throws:
ConsistencyCheckException
-
removeAttributeDescriptor
-