Package org.kuali.rice.krad.service.impl
Class PersistenceStructureServiceOjbImpl
java.lang.Object
org.kuali.rice.krad.service.impl.PersistenceServiceStructureImplBase
org.kuali.rice.krad.service.impl.PersistenceServiceImplBase
org.kuali.rice.krad.service.impl.PersistenceStructureServiceOjbImpl
- All Implemented Interfaces:
PersistenceStructureService
@Deprecated
public class PersistenceStructureServiceOjbImpl
extends PersistenceServiceImplBase
implements PersistenceStructureService
Deprecated.
-
Field Summary
FieldsModifier and TypeFieldDescriptionDeprecated.special case when the attributeClass passed in doesnt match the class of the reference-descriptor as defined in ojb-repository.Fields inherited from class org.kuali.rice.krad.service.impl.PersistenceServiceStructureImplBase
LOG -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclearPrimaryKeyFields(Object persistableObject) Deprecated.getForeignKeyFieldName(Class persistableObjectClass, String attributeName, String pkName) Deprecated.getForeignKeyFieldsPopulationState(PersistableBusinessObject bo, String referenceName) Deprecated.This method checks the foreign keys for a reference on a given BO, and tests that all fk fields are populated if any are populated.getForeignKeysForReference(Class clazz, String attributeName) Deprecated.This method will return a Map of all the foreign key fields and the corresponding primary key fields for a given reference.getInverseForeignKeysForCollection(Class boClass, String collectionName) Deprecated.Returns a listing of the FK field mappings between a BO and the elements in a collection.getNestedForeignKeyMap(Class persistableObjectClass) Deprecated.Builds a map of reference pk attributes back to the foreign key.Deprecated.getPrimaryKeys(Class clazz) Deprecated.This method returns a List of Strings, each containing the field name of one of the primary keys, as defined in the ORM layer.getReferencesForForeignKey(Class persistableObjectClass, String attributeName) Deprecated.Attempts to match the attribute name given for the class as a fk field to a reference class defined in the repository.getRelationshipMetadata(Class persistableClass, String attributeName) Deprecated.getRelationshipMetadata(Class persistableClass, String attributeName, String attributePrefix) Deprecated.getTableName(Class<? extends PersistableBusinessObject> boClass) Deprecated.Returns the name of the table underlying the business object classbooleanhasCollection(Class boClass, String collectionName) Deprecated.Returns whether BOs of the given class have a collection defined within them with the given collection name.booleanhasPrimaryKeyFieldValues(Object persistableObject) Deprecated.booleanhasReference(Class boClass, String referenceName) Deprecated.Returns whether there is a reference defined in the persistence layer with the given name.booleanisCollectionUpdatable(Class boClass, String collectionName) Deprecated.booleanisPersistable(Class clazz) Deprecated.booleanisReferenceUpdatable(Class boClass, String referenceName) Deprecated.listCollectionObjectTypes(Class boClass) Deprecated.Deprecated.listFieldNames(Class clazz) Deprecated.listPersistableSubclasses(Class superclazz) Deprecated.listReferenceObjectFields(Class boClass) Deprecated.This method uses the persistence layer to determine the list of reference objects contained within this parent object.Deprecated.This method uses the persistence layer to determine the list of reference objects contained within this parent object.voidsetPersistenceStructureServiceJpa(PersistenceStructureService persistenceStructureServiceJpa) Deprecated.Methods inherited from class org.kuali.rice.krad.service.impl.PersistenceServiceImplBase
getPrimaryKeyFieldValues, getPrimaryKeyFieldValuesMethods inherited from class org.kuali.rice.krad.service.impl.PersistenceServiceStructureImplBase
getBusinessObjectAttributeClass, getClassDescriptor, getDescriptorRepository, isJpaEnabledForKradClass, listPrimaryKeyFieldNamesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.kuali.rice.krad.service.PersistenceStructureService
getBusinessObjectAttributeClass, listPrimaryKeyFieldNames
-
Field Details
-
referenceConversionMap
Deprecated.special case when the attributeClass passed in doesnt match the class of the reference-descriptor as defined in ojb-repository. Currently the only case of this happening is ObjectCode vs. ObjectCodeCurrent. NOTE: This method makes no real sense and is a product of a hack introduced by KFS for an unknown reason. If you find yourself using this map stop and go do something else.
-
-
Constructor Details
-
PersistenceStructureServiceOjbImpl
public PersistenceStructureServiceOjbImpl()Deprecated.
-
-
Method Details
-
getPersistenceStructureServiceJpa
Deprecated. -
setPersistenceStructureServiceJpa
public void setPersistenceStructureServiceJpa(PersistenceStructureService persistenceStructureServiceJpa) Deprecated. -
isPersistable
Deprecated.- Specified by:
isPersistablein interfacePersistenceStructureService- Parameters:
clazz-- Returns:
- true if the given Class is persistable (is known to OJB)
- See Also:
-
getPrimaryKeys
Deprecated.Description copied from interface:PersistenceStructureServiceThis method returns a List of Strings, each containing the field name of one of the primary keys, as defined in the ORM layer.- Specified by:
getPrimaryKeysin interfacePersistenceStructureService- Parameters:
clazz- - Class whose primary key field names are requested- Returns:
- A List of Strings, each containing the field name of the primary key
- See Also:
-
listFieldNames
Deprecated.- Specified by:
listFieldNamesin interfacePersistenceStructureService- Parameters:
clazz- Class whose field names you want to list- Returns:
- a List of field names for the given class in the OJB repository file
- See Also:
-
clearPrimaryKeyFields
Deprecated.- Specified by:
clearPrimaryKeyFieldsin interfacePersistenceStructureService- Parameters:
persistableObject- object whose primary key fields need to be cleared- Returns:
- the object whose primary key fields have just been cleared
- See Also:
-
listPersistableSubclasses
Deprecated.- Specified by:
listPersistableSubclassesin interfacePersistenceStructureService- Parameters:
superclazz- class whose persistable subclasses (or interface whose implementors) will be returned- Returns:
- a List of persistable Classes which extend or implement the given Class
- See Also:
-
getRelationshipMetadata
public Map<String,DataObjectRelationship> getRelationshipMetadata(Class persistableClass, String attributeName, String attributePrefix) Deprecated.- Specified by:
getRelationshipMetadatain interfacePersistenceStructureService- Parameters:
persistableClass-attributeName- Name of an attribute used in the relationship- Returns:
- BusinessObjectRelationship object containing information about the object type related via the named relationship of the given class, or null if the persistence service can find no object type related via the named relationship
- See Also:
-
getRelationshipMetadata
public Map<String,DataObjectRelationship> getRelationshipMetadata(Class persistableClass, String attributeName) Deprecated.- Specified by:
getRelationshipMetadatain interfacePersistenceStructureService
-
getForeignKeyFieldName
public String getForeignKeyFieldName(Class persistableObjectClass, String attributeName, String pkName) Deprecated.- Specified by:
getForeignKeyFieldNamein interfacePersistenceStructureService- See Also:
-
getReferencesForForeignKey
Deprecated.Description copied from interface:PersistenceStructureServiceAttempts to match the attribute name given for the class as a fk field to a reference class defined in the repository. Since a fk field can have references to many tables, this returns a list of all found.- Specified by:
getReferencesForForeignKeyin interfacePersistenceStructureService- Parameters:
persistableObjectClass-attributeName-- Returns:
- Map with attribue name as key of map and class as value
- See Also:
-
getForeignKeysForReference
Deprecated.Description copied from interface:PersistenceStructureServiceThis method will return a Map of all the foreign key fields and the corresponding primary key fields for a given reference. The Map structure is: Key(String fkFieldName) => Value(String pkFieldName)- Specified by:
getForeignKeysForReferencein interfacePersistenceStructureService- Parameters:
clazz- - Class that contains the named referenceattributeName- - Name of the member that is the reference you want foreign keys for- Returns:
- returns a Map populated as described above, with one entry per foreign key field
- See Also:
-
getInverseForeignKeysForCollection
Deprecated.Description copied from interface:PersistenceStructureServiceReturns a listing of the FK field mappings between a BO and the elements in a collection. Since this is in effect a 1:n relationship, only the complete primary key set of the parent BO will be returned. for example, assume Account BO has an "acctNbrForAcct" PK, and it has a list of subAccounts, each of which has a ("acctNbrForSubAcct", "subAcctNbr") PK pair. the Account PK will be mapped to some of the PK fields of the element list. When called on the Account BO class with the "subAccounts" collection name, his method should return a map with a mapping of "acctNbrForAcct" (key) => "acctNbrForSubAcct"- Specified by:
getInverseForeignKeysForCollectionin interfacePersistenceStructureService- Parameters:
boClass-collectionName-- Returns:
-
getNestedForeignKeyMap
Deprecated.Description copied from interface:PersistenceStructureServiceBuilds a map of reference pk attributes back to the foreign key.- Specified by:
getNestedForeignKeyMapin interfacePersistenceStructureService- Parameters:
persistableObjectClass-- Returns:
- See Also:
-
hasPrimaryKeyFieldValues
Deprecated.- Specified by:
hasPrimaryKeyFieldValuesin interfacePersistenceStructureService- Parameters:
persistableObject-- Returns:
- true if all primary key fields of the string have a non-null (and non-empty, for Strings) value
- See Also:
-
getForeignKeyFieldsPopulationState
public ForeignKeyFieldsPopulationState getForeignKeyFieldsPopulationState(PersistableBusinessObject bo, String referenceName) Deprecated.Description copied from interface:PersistenceStructureServiceThis method checks the foreign keys for a reference on a given BO, and tests that all fk fields are populated if any are populated. In other words, for a given reference, it finds all the attributes of the BO that make up the foreign keys, and checks to see if they all have values. It also keeps a list of all the fieldNames that do not have values.- Specified by:
getForeignKeyFieldsPopulationStatein interfacePersistenceStructureService- Parameters:
bo- - A populated BusinessObject descendent. Must contain an attributed named referenceName.referenceName- - The name of the field that is a reference we are analyzing.- Returns:
- A populated ForeignKeyFieldsPopulation object which represents the state of population for the foreign key fields.
- See Also:
-
listReferenceObjectFields
Deprecated.Description copied from interface:PersistenceStructureServiceThis method uses the persistence layer to determine the list of reference objects contained within this parent object. For example, an Account object contains sub-objects such as Chart, as well as the key that connects the two, String chartOfAccountsCode. The return structure is: Mapinvalid input: '<'referenceName, referenceClass>. As an example, an Account object passed into this would return: 0:['chartOfAccounts', org.kuali.module.chart.bo.Chart] 1:['organization', org.kuali.module.chart.bo.Org] etc.- Specified by:
listReferenceObjectFieldsin interfacePersistenceStructureService- Parameters:
boClass- Class that would like to be analyzed for reference names- Returns:
- Map containing the reference name for the key as a string, and the class of the reference as the value. If the object contains no references, then this Map will be empty.
- See Also:
-
listCollectionObjectTypes
Deprecated.- Specified by:
listCollectionObjectTypesin interfacePersistenceStructureService
-
listCollectionObjectTypes
Deprecated.- Specified by:
listCollectionObjectTypesin interfacePersistenceStructureService
-
listReferenceObjectFields
Deprecated.Description copied from interface:PersistenceStructureServiceThis method uses the persistence layer to determine the list of reference objects contained within this parent object. For example, an Account object contains sub-objects such as Chart, as well as the key that connects the two, String chartOfAccountsCode. The return structure is: Mapinvalid input: '<'referenceName, referenceClass>. As an example, an Account object passed into this would return: 0:['chartOfAccounts', org.kuali.module.chart.bo.Chart] 1:['organization', org.kuali.module.chart.bo.Org] etc.- Specified by:
listReferenceObjectFieldsin interfacePersistenceStructureService- Parameters:
bo- BusinessObject (or subclass) instance that would like to be analyzed for reference names- Returns:
- Map containing the reference name for the key as a string, and the class of the reference as the value. If the object contains no references, then this Map will be empty.
- See Also:
-
isReferenceUpdatable
Deprecated.- Specified by:
isReferenceUpdatablein interfacePersistenceStructureService
-
isCollectionUpdatable
Deprecated.- Specified by:
isCollectionUpdatablein interfacePersistenceStructureService
-
hasCollection
Deprecated.Description copied from interface:PersistenceStructureServiceReturns whether BOs of the given class have a collection defined within them with the given collection name.- Specified by:
hasCollectionin interfacePersistenceStructureService- Parameters:
boClass-collectionName-- Returns:
-
hasReference
Deprecated.Description copied from interface:PersistenceStructureServiceReturns whether there is a reference defined in the persistence layer with the given name. Depending on the type of underlying persistence mechanism, this method may or may not return true when the referenceName really refers to a collection type. To determine whether a reference is a collection, use the hasCollection method instead. In OJB, this method will return false for collection references.- Specified by:
hasReferencein interfacePersistenceStructureService- Parameters:
boClass-referenceName-- Returns:
-
getTableName
Deprecated.Description copied from interface:PersistenceStructureServiceReturns the name of the table underlying the business object class- Specified by:
getTableNamein interfacePersistenceStructureService- Parameters:
boClass-- Returns:
-