org.kuali.kfs.coa.service.impl
Class AccountPersistenceStructureServiceImpl

java.lang.Object
  extended by org.kuali.rice.kns.service.impl.PersistenceServiceStructureImplBase
      extended by org.kuali.rice.kns.service.impl.PersistenceServiceImplBase
          extended by org.kuali.rice.kns.service.impl.PersistenceStructureServiceImpl
              extended by org.kuali.kfs.coa.service.impl.AccountPersistenceStructureServiceImpl
All Implemented Interfaces:
AccountPersistenceStructureService, org.kuali.rice.kns.service.PersistenceStructureService

public class AccountPersistenceStructureServiceImpl
extends org.kuali.rice.kns.service.impl.PersistenceStructureServiceImpl
implements AccountPersistenceStructureService


Field Summary
 
Fields inherited from class org.kuali.rice.kns.service.impl.PersistenceStructureServiceImpl
referenceConversionMap
 
Constructor Summary
AccountPersistenceStructureServiceImpl()
           
 
Method Summary
 String getAccountNumberName(org.kuali.rice.kns.bo.PersistableBusinessObject bo, String chartOfAccountsCodeName)
          Gets the name of the accountNumber field as one foreign key, paired with the specified chartOfAccountsCode field as the other, of the reference account (or other account-involved BO) contained within the specified parent object.
 String getChartOfAccountsCodeName(org.kuali.rice.kns.bo.PersistableBusinessObject bo, String accountNumberName)
          Gets the name of the chartOfAccountsCode field as one foreign key, paired with the specified accountNumber field as the other, of the reference account (or other account-involved BO) contained within the specified parent object.
 boolean isAccountRelatedClass(Class clazz)
          Decides if the specified class is an account related class, i.e.
 Map<String,String> listAccountNumberChartCodePairs(org.kuali.rice.kns.bo.PersistableBusinessObject bo)
          Determines the list of accountNumber-chartOfAccountsCode pairs as (part of) the foreign keys of the reference accounts (or other account-involved BOs) contained within the specified parent object.
 Set<String> listAccountNumberNames(org.kuali.rice.kns.bo.PersistableBusinessObject bo)
          Determines the list of accountNumber fields as one of the foreign keys of the reference accounts (or other account-involved BOs) contained within the specified parent object.
 Map<String,String> listChartCodeAccountNumberPairs(org.kuali.rice.kns.bo.PersistableBusinessObject bo)
          Determines the list of chartOfAccountsCode-accountNumber pairs as (part of) the foreign keys of the reference accounts (or other account-involved BOs) contained within the specified parent object.
 Set<String> listChartOfAccountsCodeNames(org.kuali.rice.kns.bo.PersistableBusinessObject bo)
          Determines the list of chartOfAccountsCode fields as one of the foreign keys of the reference accounts (or other account-involved BOs) contained within the specified parent object.
 Map<String,Class> listCollectionAccountFields(org.kuali.rice.kns.bo.PersistableBusinessObject bo)
          Determines the list of collection accounts (or other account-involved BOs) contained within the specified parent object.
 Set<String> listCollectionChartOfAccountsCodeNames(org.kuali.rice.kns.bo.PersistableBusinessObject bo)
          Determines the list of chartOfAccountsCode fields as one of the primary keys in the collection accounts (or other account-involved BOs) contained within the specified parent object.
 Map<String,Class> listReferenceAccountFields(org.kuali.rice.kns.bo.PersistableBusinessObject bo)
          Determines the list of reference accounts (or other account-involved BOs) contained within the specified parent object.
 Map<String,Class> listReferenceObjectFields(org.kuali.rice.kns.bo.PersistableBusinessObject bo)
          Need to stop this method from running for objects which are not bound into the ORM layer (OJB), for ex.
 void setMaintenanceDocumentDictionaryService(org.kuali.rice.kns.service.MaintenanceDocumentDictionaryService maintenanceDocumentDictionaryService)
           
 
Methods inherited from class org.kuali.rice.kns.service.impl.PersistenceStructureServiceImpl
clearPrimaryKeyFields, getForeignKeyFieldName, getForeignKeyFieldsPopulationState, getForeignKeysForReference, getInverseForeignKeysForCollection, getNestedForeignKeyMap, getPrimaryKeys, getReferencesForForeignKey, getRelationshipMetadata, getRelationshipMetadata, getTableName, hasCollection, hasPrimaryKeyFieldValues, hasReference, isCollectionUpdatable, isPersistable, isReferenceUpdatable, listCollectionObjectTypes, listCollectionObjectTypes, listFieldNames, listPersistableSubclasses, listReferenceObjectFields, setPersistenceStructureServiceJpa, setPersistenceStructureServiceOjb
 
Methods inherited from class org.kuali.rice.kns.service.impl.PersistenceServiceImplBase
getPrimaryKeyFieldValues, getPrimaryKeyFieldValues
 
Methods inherited from class org.kuali.rice.kns.service.impl.PersistenceServiceStructureImplBase
getBusinessObjectAttributeClass, getClassDescriptor, getDescriptorRepository, listPrimaryKeyFieldNames
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.kuali.rice.kns.service.PersistenceStructureService
clearPrimaryKeyFields, getBusinessObjectAttributeClass, getForeignKeyFieldName, getForeignKeyFieldsPopulationState, getForeignKeysForReference, getInverseForeignKeysForCollection, getNestedForeignKeyMap, getPrimaryKeys, getReferencesForForeignKey, getRelationshipMetadata, getRelationshipMetadata, getTableName, hasCollection, hasPrimaryKeyFieldValues, hasReference, isCollectionUpdatable, isPersistable, isReferenceUpdatable, listCollectionObjectTypes, listCollectionObjectTypes, listFieldNames, listPersistableSubclasses, listPrimaryKeyFieldNames, listReferenceObjectFields
 

Constructor Detail

AccountPersistenceStructureServiceImpl

public AccountPersistenceStructureServiceImpl()
Method Detail

isAccountRelatedClass

public boolean isAccountRelatedClass(Class clazz)
Description copied from interface: AccountPersistenceStructureService
Decides if the specified class is an account related class, i.e. whether it contains chartOfAccountsCode and accountNumber as part of the primary keys.

Specified by:
isAccountRelatedClass in interface AccountPersistenceStructureService
Parameters:
clazz - the specified class
Returns:
true if the class contains chartOfAccountsCode and accountNumber as part of the primary keys; false otherwise.

setMaintenanceDocumentDictionaryService

public void setMaintenanceDocumentDictionaryService(org.kuali.rice.kns.service.MaintenanceDocumentDictionaryService maintenanceDocumentDictionaryService)

listCollectionAccountFields

public Map<String,Class> listCollectionAccountFields(org.kuali.rice.kns.bo.PersistableBusinessObject bo)
Description copied from interface: AccountPersistenceStructureService
Determines the list of collection accounts (or other account-involved BOs) contained within the specified parent object. For example, an Award object contains awardAccounts. Note: these do not include the following cases - nested collection accounts - non-maintainable collection accounts

Specified by:
listCollectionAccountFields in interface AccountPersistenceStructureService
Parameters:
bo - BusinessObject (or subclass) instance that would like to be analyzed for collection accounts.
Returns:
Map containing the collection account names (key) and class type (value) or empty map if the BO contains no collection accounts.

listCollectionChartOfAccountsCodeNames

public Set<String> listCollectionChartOfAccountsCodeNames(org.kuali.rice.kns.bo.PersistableBusinessObject bo)
Description copied from interface: AccountPersistenceStructureService
Determines the list of chartOfAccountsCode fields as one of the primary keys in the collection accounts (or other account-involved BOs) contained within the specified parent object. For example, an Award object contains awardAccounts with chartOfAccountsCode as one of the primary keys. Note: these do not include the following cases - nested collection accounts - non-maintainable collection accounts

Specified by:
listCollectionChartOfAccountsCodeNames in interface AccountPersistenceStructureService
Parameters:
bo - BusinessObject (or subclass) instance that would like to be analyzed for collection accounts.
Returns:
Set containing the chartOfAccountsCode field names in collection accounts or empty set if the BO contains no collection accounts.

listReferenceAccountFields

public Map<String,Class> listReferenceAccountFields(org.kuali.rice.kns.bo.PersistableBusinessObject bo)
Description copied from interface: AccountPersistenceStructureService
Determines the list of reference accounts (or other account-involved BOs) contained within the specified parent object. For example, an Account object contains reportsToAccount etc. Note: these do not include the following cases: - nested reference accounts - reference accounts in collections - reference accounts whose PKs are also PKs of the BO - reference accounts whose PKs don't exist in the BO as foreign keys but are referred by the maintenance page in a nested way - non-existing reference accounts whose PKs exist in the BO as foreign keys (this should never happen) - non-maintainable reference accounts

Specified by:
listReferenceAccountFields in interface AccountPersistenceStructureService
Parameters:
bo - BusinessObject (or subclass) instance that would like to be analyzed for reference accounts.
Returns:
Map containing the reference account names (key) and class type (value) or empty map if the BO contains no reference accounts.

listChartCodeAccountNumberPairs

public Map<String,String> listChartCodeAccountNumberPairs(org.kuali.rice.kns.bo.PersistableBusinessObject bo)
Description copied from interface: AccountPersistenceStructureService
Determines the list of chartOfAccountsCode-accountNumber pairs as (part of) the foreign keys of the reference accounts (or other account-involved BOs) contained within the specified parent object. For example, an Account object contains reportsToAccount with reportsToChartOfAccountsCode-reportsToAccountNumber as the foreign keys. Note: these do not include the following cases: - nested reference accounts - reference accounts in collections - reference accounts whose PKs are also PKs of the BO - reference accounts whose PKs don't exist in the BO as foreign keys but are referred by the maintainance page in a nested way - non-existing reference accounts whose PKs exist in the BO as foreign keys (this should never happen) - non-maintainable reference accounts

Specified by:
listChartCodeAccountNumberPairs in interface AccountPersistenceStructureService
Parameters:
bo - BusinessObject (or subclass) instance that would like to be analyzed for reference accounts.
Returns:
Map containing the chartOfAccountsCode-accountNumber (key-value) foreign key pairs for all reference accounts or empty map if the BO contains no reference accounts.

listAccountNumberChartCodePairs

public Map<String,String> listAccountNumberChartCodePairs(org.kuali.rice.kns.bo.PersistableBusinessObject bo)
Description copied from interface: AccountPersistenceStructureService
Determines the list of accountNumber-chartOfAccountsCode pairs as (part of) the foreign keys of the reference accounts (or other account-involved BOs) contained within the specified parent object. For example, an Account object contains reportsToAccount with reportsToAccountNumber-reportsToChartOfAccountsCode as the foreign keys. Note: these do not include the following cases: - nested reference accounts - reference accounts in collections - reference accounts whose PKs are also PKs of the BO - reference accounts whose PKs don't exist in the BO as foreign keys but are referred by the maintainance page in a nested way - non-existing reference accounts whose PKs exist in the BO as foreign keys (this should never happen) - non-maintainable reference accounts

Specified by:
listAccountNumberChartCodePairs in interface AccountPersistenceStructureService
Parameters:
bo - BusinessObject (or subclass) instance that would like to be analyzed for reference accounts.
Returns:
Map containing the accountNumber-chartOfAccountsCode (key-value) foreign key pairs for all reference accounts or empty map if the BO contains no reference accounts.

listChartOfAccountsCodeNames

public Set<String> listChartOfAccountsCodeNames(org.kuali.rice.kns.bo.PersistableBusinessObject bo)
Description copied from interface: AccountPersistenceStructureService
Determines the list of chartOfAccountsCode fields as one of the foreign keys of the reference accounts (or other account-involved BOs) contained within the specified parent object. For example, an Account object contains reportsToAccount with reportsToChartOfAccountsCode as one of the foreign keys. Note: these do not include the following cases: - nested reference accounts - reference accounts in collections - reference accounts whose PKs are also PKs of the BO - reference accounts whose PKs don't exist in the BO as foreign keys but are referred by the maintainance page in a nested way - non-existing reference accounts whose PKs exist in the BO as foreign keys (this should never happen) - non-maintainable reference accounts

Specified by:
listChartOfAccountsCodeNames in interface AccountPersistenceStructureService
Parameters:
bo - BusinessObject (or subclass) instance that would like to be analyzed for reference accounts.
Returns:
Set containing the chartOfAccountsCode foreign key names for all reference accounts or empty set if the BO contains no reference accounts.

listAccountNumberNames

public Set<String> listAccountNumberNames(org.kuali.rice.kns.bo.PersistableBusinessObject bo)
Description copied from interface: AccountPersistenceStructureService
Determines the list of accountNumber fields as one of the foreign keys of the reference accounts (or other account-involved BOs) contained within the specified parent object. For example, an Account object contains reportsToAccount with reportsToAccountNumber as one of the foreign keys. Note: these do not include the following cases: - nested reference accounts - reference accounts in collections - reference accounts whose PKs are also PKs of the BO - reference accounts whose PKs don't exist in the BO as foreign keys but are referred by the maintainance page in a nested way - non-existing reference accounts whose PKs exist in the BO as foreign keys (this should never happen) - non-maintainable reference accounts

Specified by:
listAccountNumberNames in interface AccountPersistenceStructureService
Parameters:
bo - BusinessObject (or subclass) instance that would like to be analyzed for reference accounts.
Returns:
Set containing the accountNumber foreign key names for all reference accounts or empty set if the BO contains no reference accounts.

getChartOfAccountsCodeName

public String getChartOfAccountsCodeName(org.kuali.rice.kns.bo.PersistableBusinessObject bo,
                                         String accountNumberName)
Description copied from interface: AccountPersistenceStructureService
Gets the name of the chartOfAccountsCode field as one foreign key, paired with the specified accountNumber field as the other, of the reference account (or other account-involved BO) contained within the specified parent object. For example, an Account object contains reportsToAccount with reportsToChartOfAccountsCode and reportsToAccountNumber as the foreign key pair.

Specified by:
getChartOfAccountsCodeName in interface AccountPersistenceStructureService
Parameters:
bo - BusinessObject (or subclass) instance that would like to be analyzed for reference accounts.
accountNumberName - the name of the foreign key corresponding to the primary key accountNumber of the reference account.
Returns:
the chartOfAccountsCode field name of the reference account identified by foreign key accountNumberFieldName, or empty string if the BO contains no such reference account.

getAccountNumberName

public String getAccountNumberName(org.kuali.rice.kns.bo.PersistableBusinessObject bo,
                                   String chartOfAccountsCodeName)
Description copied from interface: AccountPersistenceStructureService
Gets the name of the accountNumber field as one foreign key, paired with the specified chartOfAccountsCode field as the other, of the reference account (or other account-involved BO) contained within the specified parent object. For example, an Account object contains reportsToAccount with reportsToAccountNumber and reportsToChartOfAccountsCode as the foreign key pair.

Specified by:
getAccountNumberName in interface AccountPersistenceStructureService
Parameters:
bo - BusinessObject (or subclass) instance that would like to be analyzed for reference accounts.
chartOfAccountsCodeName - the name of the foreign key corresponding to the primary key chartOfAccountsCode of the reference account.
Returns:
the accountNumber field name of the reference account identified by foreign key chartOfAccountsCode, or empty string if the BO contains no such reference account.

listReferenceObjectFields

public Map<String,Class> listReferenceObjectFields(org.kuali.rice.kns.bo.PersistableBusinessObject bo)
Need to stop this method from running for objects which are not bound into the ORM layer (OJB), for ex. OrgReviewRole is not persistable. In this case, we can just return an empty list.

Specified by:
listReferenceObjectFields in interface org.kuali.rice.kns.service.PersistenceStructureService
Overrides:
listReferenceObjectFields in class org.kuali.rice.kns.service.impl.PersistenceStructureServiceImpl
See Also:
PersistenceStructureServiceImpl.listReferenceObjectFields(org.kuali.rice.kns.bo.PersistableBusinessObject)


Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.