Java Doc for BOSelector.java in  » UML » MetaBoss » com » metaboss » sdlctools » domains » enterprisemodel » 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 » UML » MetaBoss » com.metaboss.sdlctools.domains.enterprisemodel 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


com.metaboss.sdlctools.domains.enterprisemodel.BOSelector

All known Subclasses:   com.metaboss.sdlctools.domains.enterprisemodel.impl.BOSelectorImpl,
BOSelector
public interface BOSelector extends BOObject(Code)
Selector is the definition of the sub-query available on the entity collection. Such sub-query allows to further narrow collection of entities obtained via association navigation. Selector is different to association. Each association results in 'Foreign Key' type of relationship between entities. Selector results in just an extra method on the entity collection and has no impact on the database structure. Lets look at the example :
  • Client entity is associated with Order entity via ClientPlacesOrder association. This means that the Client will have the method :
    
     // Returns all orders owned by the client regardless of their current state
     public BOOrderCollection getOrders()
     

    By calling this method program can obtain the collection of all orders ever given by the client
  • At the same time Order entity has following selectors defined : MostRecentOrder (returning zero or one Order), ActiveOrders (returning zero or more Orders) and CancelledOrders (again returning zero or more Orders). In this case Order Collection will have following methods :
    
     // Returns last placed order ot null if this collection is empty
     public BOOrder selectMostRecentOrder()
     // Returns collection of zero or more active orders
     public BOOrderCollection selectActiveOrders()
     // Returns collection of zero or more cancelled orders
     public BOOrderCollection selectCancelledOrders()
     

    By calling this methods program can select single entity or sub-collection of entities satisfying particular criteria.
  • Using both facilities above, calling program can, for example, obtain desired orders for the client in one stroke as follows :
    
     BOOrderCollection lActiveOrders = null;
     BOOrderCollection lLastCancelledOrder = null;
     // Get client's active orders
     lActiveOrders = lClient.getOrders().selectActiveOrders();
     // Now get most recent cancelled order
     lLastCancelledOrder = lClient.getOrders().selectCancelledOrders().selectMostRecentOrder();
     

  • This feature is even more powerful when combined with collection association methods. To further above example, suppose Order entity is associated with Product (many Orders can refer to one Product). In this case to get all products client is waiting on :
    
     BOProductCollection lDesiredProducts = null;
     // Get all distinct products from client's active orders
     lDesiredProducts = lClient.getOrders().selectActiveOrders().getDistinctProducts();
     

Note that underlying implementation of collections and selectors ensures that the actual selection and loading is deferred to database, all subqueries are combined in one and actual query only executed when actual data is about to be used. This ensures maximum possible speed without compromising reuse. Selector Name must be unique within particular entity. Selector definition contains list of input parameters. Any number of parameters of any valid datatype can be specified. Selector definition specifies selector cardinality. This controls the patterns of how selector method is named (i.e. whether to use singular or plural name).
At the storage interface level, the details of any number of selectors are carried in the array of com.metaboss.enterprise.ps.STSelectorDetails[] structures it contains 'history' of all selectors and associations invoked. Array of these structures is passed to majority of all get methods.




Method Summary
public  SelectorCardinalitygetCardinality()
     Retrieves cardinality for the return from this selector.
public  StringgetDescription()
    
public  BOEntitygetEntity()
     Returns entity, which owns this selector.
public  BOSelectorInputFieldListgetInputFields()
    
public  StringgetJavaSelector()
    
public  StringgetName()
     Retrieves selector name.
public  StringgetRef()
    
public  StringgetSQLSelector()
    
public  booleanisImplicit()
    
public  voidsetCardinality(SelectorCardinality pCardinality)
     Sets cardinality for the return from this selector.
public  voidsetDescription(String pDescription)
    
public  voidsetIsImplicit(boolean isImplicit)
    
public  voidsetJavaSelector(String pJavaSelector)
    
public  voidsetSQLSelector(String pSQLSelector)
    



Method Detail
getCardinality
public SelectorCardinality getCardinality() throws BOException(Code)
Retrieves cardinality for the return from this selector.



getDescription
public String getDescription() throws BOException(Code)
Retrieves description



getEntity
public BOEntity getEntity() throws BOException(Code)
Returns entity, which owns this selector. Together with the selector name forms the unique selector identifier



getInputFields
public BOSelectorInputFieldList getInputFields() throws BOException(Code)
Retireves the list of input fields



getJavaSelector
public String getJavaSelector() throws BOException(Code)
Retrieves text of java implementation template of the selector



getName
public String getName() throws BOException(Code)
Retrieves selector name. Consists of the prefix and suffix This name is always present



getRef
public String getRef() throws BOException(Code)
Retrieves unique reference



getSQLSelector
public String getSQLSelector() throws BOException(Code)
Retrieves text of SQL implementation template of the selector



isImplicit
public boolean isImplicit() throws BOException(Code)
Returns boolean flag indicating if this selector is an implicit selector



setCardinality
public void setCardinality(SelectorCardinality pCardinality) throws BOException(Code)
Sets cardinality for the return from this selector.



setDescription
public void setDescription(String pDescription) throws BOException(Code)
Sets description



setIsImplicit
public void setIsImplicit(boolean isImplicit) throws BOException(Code)
Sets boolean flag indicating if this selector is an implicit selector



setJavaSelector
public void setJavaSelector(String pJavaSelector) throws BOException(Code)
Sets text of java implementation template of the selector



setSQLSelector
public void setSQLSelector(String pSQLSelector) throws BOException(Code)
Sets text of SQL implementation template of the selector



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