Class PersistenceStructureServiceOjbImpl

All Implemented Interfaces:
PersistenceStructureService

@Deprecated public class PersistenceStructureServiceOjbImpl extends PersistenceServiceImplBase implements PersistenceStructureService
Deprecated.
  • Field Details

    • referenceConversionMap

      public static Map<Class,Class> 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

      public PersistenceStructureService getPersistenceStructureServiceJpa()
      Deprecated.
    • setPersistenceStructureServiceJpa

      public void setPersistenceStructureServiceJpa(PersistenceStructureService persistenceStructureServiceJpa)
      Deprecated.
    • isPersistable

      public boolean isPersistable(Class clazz)
      Deprecated.
      Specified by:
      isPersistable in interface PersistenceStructureService
      Parameters:
      clazz -
      Returns:
      true if the given Class is persistable (is known to OJB)
      See Also:
      • invalid reference
        org.kuali.rice.krad.service.PersistenceService#isPersistable(java.lang.Class)
    • getPrimaryKeys

      public List getPrimaryKeys(Class clazz)
      Deprecated.
      Description copied from interface: PersistenceStructureService
      This 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:
      getPrimaryKeys in interface PersistenceStructureService
      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:
      • invalid reference
        org.kuali.rice.krad.service.PersistenceService#getPrimaryKeys(java.lang.Class)
    • listFieldNames

      public List listFieldNames(Class clazz)
      Deprecated.
      Specified by:
      listFieldNames in interface PersistenceStructureService
      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:
      • invalid reference
        org.kuali.rice.krad.service.PersistenceMetadataExplorerService#listFieldNames(java.lang.Class)
    • clearPrimaryKeyFields

      public Object clearPrimaryKeyFields(Object persistableObject)
      Deprecated.
      Specified by:
      clearPrimaryKeyFields in interface PersistenceStructureService
      Parameters:
      persistableObject - object whose primary key fields need to be cleared
      Returns:
      the object whose primary key fields have just been cleared
      See Also:
      • invalid reference
        org.kuali.rice.krad.service.PersistenceMetadataService#clearPrimaryKeyFields(java.lang.Object)
    • listPersistableSubclasses

      public List listPersistableSubclasses(Class superclazz)
      Deprecated.
      Specified by:
      listPersistableSubclasses in interface PersistenceStructureService
      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:
      • invalid reference
        org.kuali.rice.krad.service.PersistenceMetadataExplorerService#listPersistableSubclasses(java.lang.Class)
    • getRelationshipMetadata

      public Map<String,DataObjectRelationship> getRelationshipMetadata(Class persistableClass, String attributeName, String attributePrefix)
      Deprecated.
      Specified by:
      getRelationshipMetadata in interface PersistenceStructureService
      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:
      • invalid reference
        org.kuali.rice.krad.service.PersistenceService#getRelationshipMetadata(java.lang.Class, java.lang.String)
    • getRelationshipMetadata

      public Map<String,DataObjectRelationship> getRelationshipMetadata(Class persistableClass, String attributeName)
      Deprecated.
      Specified by:
      getRelationshipMetadata in interface PersistenceStructureService
    • getForeignKeyFieldName

      public String getForeignKeyFieldName(Class persistableObjectClass, String attributeName, String pkName)
      Deprecated.
      Specified by:
      getForeignKeyFieldName in interface PersistenceStructureService
      See Also:
      • invalid reference
        org.kuali.rice.krad.service.PersistenceService#getForeignKeyFieldName(java.lang.Object, java.lang.String, java.lang.String)
    • getReferencesForForeignKey

      public Map getReferencesForForeignKey(Class persistableObjectClass, String attributeName)
      Deprecated.
      Description copied from interface: PersistenceStructureService
      Attempts 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:
      getReferencesForForeignKey in interface PersistenceStructureService
      Parameters:
      persistableObjectClass -
      attributeName -
      Returns:
      Map with attribue name as key of map and class as value
      See Also:
      • invalid reference
        org.kuali.rice.krad.service.PersistenceService#getReferencesForForeignKey(java.lang.Class, java.lang.String)
    • getForeignKeysForReference

      public Map getForeignKeysForReference(Class clazz, String attributeName)
      Deprecated.
      Description copied from interface: PersistenceStructureService
      This 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:
      getForeignKeysForReference in interface PersistenceStructureService
      Parameters:
      clazz - - Class that contains the named reference
      attributeName - - 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:
      • invalid reference
        The Map structure is: Key(String fkFieldName) =>
              Value(String pkFieldName) NOTE that this implementation depends on
              the ordering of foreign-key elements in the ojb-repository matching
              the ordering of primary-key declarations of the class on the other
              side of the relationship. This is done because: 1. The current
              version of OJB requires you to declare all of these things in the
              correct (and matching) order in the ojb-repository file for it to
              work at all. 2. There is no other way to match a given foreign-key
              reference to its corresponding primary-key on the opposing side of
              the relationship. Yes, this is a crummy way to do it, but OJB doesnt
              provide explicit matches of foreign-keys to primary keys, and always
              assumes that foreign-keys map to primary keys on the other object,
              and never to a set of candidate keys, or any other column.
    • getInverseForeignKeysForCollection

      public Map<String,String> getInverseForeignKeysForCollection(Class boClass, String collectionName)
      Deprecated.
      Description copied from interface: PersistenceStructureService
      Returns 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:
      getInverseForeignKeysForCollection in interface PersistenceStructureService
      Parameters:
      boClass -
      collectionName -
      Returns:
    • getNestedForeignKeyMap

      public Map getNestedForeignKeyMap(Class persistableObjectClass)
      Deprecated.
      Description copied from interface: PersistenceStructureService
      Builds a map of reference pk attributes back to the foreign key.
      Specified by:
      getNestedForeignKeyMap in interface PersistenceStructureService
      Parameters:
      persistableObjectClass -
      Returns:
      See Also:
      • invalid reference
        org.kuali.rice.krad.service.PersistenceService#getNestedForeignKeyMap(java.lang.Class)
    • hasPrimaryKeyFieldValues

      public boolean hasPrimaryKeyFieldValues(Object persistableObject)
      Deprecated.
      Specified by:
      hasPrimaryKeyFieldValues in interface PersistenceStructureService
      Parameters:
      persistableObject -
      Returns:
      true if all primary key fields of the string have a non-null (and non-empty, for Strings) value
      See Also:
      • invalid reference
        org.kuali.rice.krad.service.PersistenceMetadataService#hasPrimaryKeyFieldValues(java.lang.Object)
    • getForeignKeyFieldsPopulationState

      public ForeignKeyFieldsPopulationState getForeignKeyFieldsPopulationState(PersistableBusinessObject bo, String referenceName)
      Deprecated.
      Description copied from interface: PersistenceStructureService
      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. 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:
      getForeignKeyFieldsPopulationState in interface PersistenceStructureService
      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:
      • invalid reference
        org.kuali.rice.krad.service.PersistenceService#getForeignKeyFieldsPopulationState(org.kuali.rice.krad.bo.BusinessObject, java.lang.String)
    • listReferenceObjectFields

      public Map<String,Class> listReferenceObjectFields(Class boClass)
      Deprecated.
      Description copied from interface: PersistenceStructureService
      This 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:
      listReferenceObjectFields in interface PersistenceStructureService
      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:
      • invalid reference
        org.kuali.rice.krad.service.PersistenceStructureService#listReferenceObjectFieldNames(java.lang.Class)
    • listCollectionObjectTypes

      public Map<String,Class> listCollectionObjectTypes(Class boClass)
      Deprecated.
      Specified by:
      listCollectionObjectTypes in interface PersistenceStructureService
    • listCollectionObjectTypes

      public Map<String,Class> listCollectionObjectTypes(PersistableBusinessObject bo)
      Deprecated.
      Specified by:
      listCollectionObjectTypes in interface PersistenceStructureService
    • listReferenceObjectFields

      public Map<String,Class> listReferenceObjectFields(PersistableBusinessObject bo)
      Deprecated.
      Description copied from interface: PersistenceStructureService
      This 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:
      listReferenceObjectFields in interface PersistenceStructureService
      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:
      • invalid reference
        org.kuali.rice.krad.service.PersistenceStructureService#listReferenceObjectFieldNames(org.kuali.rice.krad.bo.BusinessObject)
    • isReferenceUpdatable

      public boolean isReferenceUpdatable(Class boClass, String referenceName)
      Deprecated.
      Specified by:
      isReferenceUpdatable in interface PersistenceStructureService
    • isCollectionUpdatable

      public boolean isCollectionUpdatable(Class boClass, String collectionName)
      Deprecated.
      Specified by:
      isCollectionUpdatable in interface PersistenceStructureService
    • hasCollection

      public boolean hasCollection(Class boClass, String collectionName)
      Deprecated.
      Description copied from interface: PersistenceStructureService
      Returns whether BOs of the given class have a collection defined within them with the given collection name.
      Specified by:
      hasCollection in interface PersistenceStructureService
      Parameters:
      boClass -
      collectionName -
      Returns:
    • hasReference

      public boolean hasReference(Class boClass, String referenceName)
      Deprecated.
      Description copied from interface: PersistenceStructureService
      Returns 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:
      hasReference in interface PersistenceStructureService
      Parameters:
      boClass -
      referenceName -
      Returns:
    • getTableName

      public String getTableName(Class<? extends PersistableBusinessObject> boClass)
      Deprecated.
      Description copied from interface: PersistenceStructureService
      Returns the name of the table underlying the business object class
      Specified by:
      getTableName in interface PersistenceStructureService
      Parameters:
      boClass -
      Returns: