Java Doc for PersistenceStructureService.java in  » ERP-CRM-Financial » Kuali-Financial-System » org » kuali » core » service » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » ERP CRM Financial » Kuali Financial System » org.kuali.core.service 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.kuali.core.service.PersistenceStructureService

All known Subclasses:   org.kuali.core.service.impl.PersistenceStructureServiceImpl,
PersistenceStructureService
public interface PersistenceStructureService (Code)
This interface defines methods that a Persistence Service must provide. PersistenceMetadataService provides access to persistence-layer information about persistable classes.




Method Summary
public  ObjectclearPrimaryKeyFields(Object persistableObject)
    
public  ClassgetBusinessObjectAttributeClass(Class clazz, String attributeName)
     This method is a PersistableBusinessObject specifific utility method.
public  StringgetForeignKeyFieldName(Class persistableObjectClass, String attributeName, String pkName)
    
public  ForeignKeyFieldsPopulationStategetForeignKeyFieldsPopulationState(PersistableBusinessObject bo, String referenceName)
     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.
public  MapgetForeignKeysForReference(Class clazz, String attributeName)
     This method will return a Map of all the foreign key fields and the corresponding primary key fields for a given reference.
public  Map<String, String>getInverseForeignKeysForCollection(Class boClass, String collectionName)
     Returns a listing of the FK field mappings between a BO and the elements in a collection.
public  MapgetNestedForeignKeyMap(Class persistableObjectClass)
     Builds a map of reference pk attributes back to the foreign key.
public  MapgetPrimaryKeyFieldAnonymousMarking(Class clazz)
    
public  ListgetPrimaryKeys(Class clazz)
     This method returns a List of Strings, each containing the field name of one of the primary keys, as defined in the ORM layer.
public  Map<String, Class>getReferencesForForeignKey(Class persistableObjectClass, String attributeName)
     Attempts to match the attribute name given for the class as a fk field to a reference class defined in the repository.
public  Map<String, BusinessObjectRelationship>getRelationshipMetadata(Class persistableClass, String attributeName, String attributePrefix)
    
public  Map<String, BusinessObjectRelationship>getRelationshipMetadata(Class persistableClass, String attributeName)
    
public  booleanhasCollection(Class boClass, String collectionName)
     Returns whether BOs of the given class have a collection defined within them with the given collection name.
public  booleanhasPrimaryKeyFieldValues(Object persistableObject)
    
public  booleanhasReference(Class boClass, String referenceName)
     Returns whether there is a reference defined in the persistence layer with the given name.
public  booleanisCollectionUpdatable(Class boClass, String collectionName)
    
public  booleanisPersistable(Class clazz)
    
public  booleanisReferenceUpdatable(Class boClass, String referenceName)
    
public  Map<String, Class>listCollectionObjectTypes(Class boClass)
    
public  Map<String, Class>listCollectionObjectTypes(PersistableBusinessObject bo)
    
public  ListlistFieldNames(Class clazz)
    
public  ListlistPersistableSubclasses(Class superclazz)
    
public  ListlistPrimaryKeyFieldNames(Class clazz)
    
public  Map<String, Class>listReferenceObjectFields(Class boClass)
     This method uses the persistence layer to determine the list of reference objects contained within this parent object.
public  Map<String, Class>listReferenceObjectFields(PersistableBusinessObject bo)
     This method uses the persistence layer to determine the list of reference objects contained within this parent object.



Method Detail
clearPrimaryKeyFields
public Object clearPrimaryKeyFields(Object persistableObject)(Code)

Parameters:
  persistableObject - object whose primary key fields need to be cleared the object whose primary key fields have just been cleared
throws:
  IllegalArgumentException - if the given Object is null
throws:
  ClassNotPersistableException - if the given object is of a type not described in the OJB repository



getBusinessObjectAttributeClass
public Class getBusinessObjectAttributeClass(Class clazz, String attributeName) throws ObjectNotABusinessObjectRuntimeException(Code)
This method is a PersistableBusinessObject specifific utility method. If the Class clazz passed in is a descendent of PersistableBusinessObject, and if the attributeName specified exists on the object, then the class of this attribute named will be returned.
Parameters:
  clazz - - class to be examined for the attribute's class
Parameters:
  attributeName - - name of the class' attribute to be examined the class of the named attribute, if no exceptions occur
throws:
  ObjectNotABusinessObjectRuntimeException - - if the class specified is not a descendent of PersistableBusinessObject, or the class of thenamed attribute is not descended from PersistableBusinessObject



getForeignKeyFieldName
public String getForeignKeyFieldName(Class persistableObjectClass, String attributeName, String pkName)(Code)



getForeignKeyFieldsPopulationState
public ForeignKeyFieldsPopulationState getForeignKeyFieldsPopulationState(PersistableBusinessObject bo, String referenceName)(Code)
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.
Parameters:
  bo - - A populated BusinessObject descendent. Must contain an attributed named referenceName.
Parameters:
  referenceName - - The name of the field that is a reference we are analyzing. A populated ForeignKeyFieldsPopulation object which represents the state of population for the foreign key fields.



getForeignKeysForReference
public Map getForeignKeysForReference(Class clazz, String attributeName)(Code)
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)
Parameters:
  clazz - - Class that contains the named reference
Parameters:
  attributeName - - Name of the member that is the reference you want foreign keys for returns a Map populated as described above, with one entry per foreign key field



getInverseForeignKeysForCollection
public Map<String, String> getInverseForeignKeysForCollection(Class boClass, String collectionName)(Code)
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"
Parameters:
  boClass -
Parameters:
  collectionName -



getNestedForeignKeyMap
public Map getNestedForeignKeyMap(Class persistableObjectClass)(Code)
Builds a map of reference pk attributes back to the foreign key.
Parameters:
  persistableObjectClass -



getPrimaryKeyFieldAnonymousMarking
public Map getPrimaryKeyFieldAnonymousMarking(Class clazz)(Code)

Parameters:
  clazz - whose primary key field name, anonymous key marking is requested for a Map containing the primary key name as the key and Boolean indicating whether or not the pk is marked as anonymousin the obj repository file
throws:
  IllegalArgumentException - if the given Object is null
throws:
  ClassNotPersistableException - if the given object is of a type not described in the OJB repository



getPrimaryKeys
public List getPrimaryKeys(Class clazz)(Code)
This method returns a List of Strings, each containing the field name of one of the primary keys, as defined in the ORM layer.
Parameters:
  clazz - - Class whose primary key field names are requested A List of Strings, each containing the field name of the primary key
throws:
  IllegalArgumentException - if the given Object is null
throws:
  ClassNotPersistableException - if the given object is of a type not described in the OJB repository



getReferencesForForeignKey
public Map<String, Class> getReferencesForForeignKey(Class persistableObjectClass, String attributeName)(Code)
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.
Parameters:
  persistableObjectClass -
Parameters:
  attributeName - Map with attribue name as key of map and class as value



getRelationshipMetadata
public Map<String, BusinessObjectRelationship> getRelationshipMetadata(Class persistableClass, String attributeName, String attributePrefix)(Code)

Parameters:
  persistableClass -
Parameters:
  attributeName - Name of an attribute used in the relationship BusinessObjectRelationship object containing information about the object type related via the named relationship of thegiven class, or null if the persistence service can find no object type related via the named relationship
throws:
  IllegalArgumentException - if the given Class is null
throws:
  IllegalArgumentException - if the given relationshipName is blanks
throws:
  ClassNotPersistableException - if the given Class is a type not described in the OJB repository



getRelationshipMetadata
public Map<String, BusinessObjectRelationship> getRelationshipMetadata(Class persistableClass, String attributeName)(Code)



hasCollection
public boolean hasCollection(Class boClass, String collectionName)(Code)
Returns whether BOs of the given class have a collection defined within them with the given collection name.
Parameters:
  boClass -
Parameters:
  collectionName -



hasPrimaryKeyFieldValues
public boolean hasPrimaryKeyFieldValues(Object persistableObject)(Code)

Parameters:
  persistableObject - true if all primary key fields of the string have a non-null (and non-empty, for Strings) value
throws:
  IllegalArgumentException - if the given Object is null
throws:
  ClassNotPersistableException - if the given object is of a type not described in the OJB repository



hasReference
public boolean hasReference(Class boClass, String referenceName)(Code)
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.
Parameters:
  boClass -
Parameters:
  referenceName -



isCollectionUpdatable
public boolean isCollectionUpdatable(Class boClass, String collectionName)(Code)



isPersistable
public boolean isPersistable(Class clazz)(Code)

Parameters:
  clazz - true if the given Class is persistable (is known to OJB)



isReferenceUpdatable
public boolean isReferenceUpdatable(Class boClass, String referenceName)(Code)



listCollectionObjectTypes
public Map<String, Class> listCollectionObjectTypes(Class boClass)(Code)



listCollectionObjectTypes
public Map<String, Class> listCollectionObjectTypes(PersistableBusinessObject bo)(Code)



listFieldNames
public List listFieldNames(Class clazz)(Code)

Parameters:
  clazz - Class whose field names you want to list a List of field names for the given class in the OJB repository file
throws:
  IllegalArgumentException - if the given Class is null
throws:
  ClassNotPersistableException - if the given object is of a type not described in the OJB repository



listPersistableSubclasses
public List listPersistableSubclasses(Class superclazz)(Code)

Parameters:
  superclazz - class whose persistable subclasses (or interface whose implementors) will be returned a List of persistable Classes which extend or implement the given Class
throws:
  IllegalArgumentException - if the given class is null



listPrimaryKeyFieldNames
public List listPrimaryKeyFieldNames(Class clazz)(Code)

Parameters:
  clazz - Class whose primary key field names you want to list a List of field names for the given class which are designated as key fields in the OJB repository file
throws:
  IllegalArgumentException - if the given Class is null
throws:
  ClassNotPersistableException - if the given object is of a type not described in the OJB repository



listReferenceObjectFields
public Map<String, Class> listReferenceObjectFields(Class boClass)(Code)
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: Map. 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.
Parameters:
  boClass - Class that would like to be analyzed for reference names Map containing the reference name for the key as a string, and the class of the reference as the value. If the objectcontains no references, then this Map will be empty.



listReferenceObjectFields
public Map<String, Class> listReferenceObjectFields(PersistableBusinessObject bo)(Code)
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: Map. 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.
Parameters:
  bo - BusinessObject (or subclass) instance that would like to be analyzed for reference names Map containing the reference name for the key as a string, and the class of the reference as the value. If the objectcontains no references, then this Map will be empty.



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.