Java Doc for Catalog.java in  » Development » ivatamasks » com » ivata » mask » web » demo » catalog » 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 » Development » ivatamasks » com.ivata.mask.web.demo.catalog 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.ivata.mask.web.demo.catalog.Catalog

Catalog
final public class Catalog implements PersistenceManager(Code)

This is the main class of the demo. It represents a catalog of products.


author:
   Colin MacLeod
author:
   colin.macleod@ivata.com
since:
   ivata masks 0.1 (2004-05-09)
version:
   $Revision: 1.17 $


Field Summary
final public static  intINVALID_ID
     Unique id for invalid objects.


Method Summary
public synchronized  ValueObjectadd(PersistenceSession session, ValueObject valueObject)
    

Add a new object to be persisted.


Parameters:
  session - open persistence session, used to store the object.
Parameters:
  valueObject - value object to be persisted.
public synchronized  voidamend(PersistenceSession session, ValueObject valueObject)
    

Persist changes to an existing object.

public  ListfindAll(PersistenceSession session, Class classParam)
     Retrieve all instances of a particular class.
public  ValueObjectfindByPrimaryKey(PersistenceSession session, Class classParam, Serializable key)
     Retrieve a single instance of a particular class.
public static synchronized  CataloggetInstance()
    

Get the sole instance of this class.

For the demo, this is a singleton.

public synchronized  MaskFactorygetMaskFactory()
    

Get the mask factory used throughout this application.

public  PersistenceSessionopenSession()
    

Open a catalog session.

public  PersistenceSessionopenSession(HttpSession webSessionParam)
    

Open a catalog session.

public  PersistenceSessionopenSession(Object systemSession)
     You can't use a system session in this simple demo.
public  voidremove(PersistenceSession session, Class classParam, Serializable key)
    

Remove a value object from the system.


Parameters:
  session - open persistence session, used to remove the object.
Parameters:
  classParam - class of object to be retrieved.
public  voidreset()
    

Reset the catalog to its initial state.

public  voidsetMaskFactory(MaskFactory factory)
    

Set the mask factory used throughout this application.

protected  voidsetPropertyValues(ValueObject from, ValueObject to)
    

Override to set all property values from one value object to another.


Field Detail
INVALID_ID
final public static int INVALID_ID(Code)
Unique id for invalid objects.





Method Detail
add
public synchronized ValueObject add(PersistenceSession session, ValueObject valueObject) throws PersistenceException(Code)

Add a new object to be persisted.


Parameters:
  session - open persistence session, used to store the object.
Parameters:
  valueObject - value object to be persisted. new value object with id set appropriately.
throws:
  PersistenceException - thrown by the underlying persistencemechanism if the object cannot be saved for any reason.
See Also:   com.ivata.mask.persistence.PersistenceManager.add



amend
public synchronized void amend(PersistenceSession session, ValueObject valueObject) throws PersistenceException(Code)

Persist changes to an existing object.


Parameters:
  session - open persistence session, used to store the changes tothe object.
Parameters:
  valueObject - value object to be persisted.
throws:
  PersistenceException - thrown by the underlying persistencemechanism if the object cannot be saved for any reason.
See Also:   com.ivata.mask.persistence.PersistenceManager.amend



findAll
public List findAll(PersistenceSession session, Class classParam)(Code)
Retrieve all instances of a particular class. This method is used in the list pages.
Parameters:
  session - open persistence session, used to fetch the objects.
Parameters:
  classParam - class of objects to be retrieved. Must be a subclassof ValueObject. List containing instances of the requested class.
See Also:   com.ivata.mask.PersistenceManager.locateByBaseClass



findByPrimaryKey
public ValueObject findByPrimaryKey(PersistenceSession session, Class classParam, Serializable key) throws PersistenceException(Code)
Retrieve a single instance of a particular class. This method is used in the input/display pages.
Parameters:
  session - open persistence session, used to fetch the object.
Parameters:
  classParam - class of object to be retrieved. Must be a subclassof ValueObject.
Parameters:
  key - unique identifier of the object to retrieve. instance of the requested class which matches the identifierkey.
throws:
  PersistenceException - thrown by the underlying persistencemechanism if the object cannot be retrieved for any reason.
See Also:   com.ivata.mask.persistence.PersistenceManager.findByPrimaryKey



getInstance
public static synchronized Catalog getInstance()(Code)

Get the sole instance of this class.

For the demo, this is a singleton. It's better to use dependency injection or service locator patterns, in real life.

only instance of this class.



getMaskFactory
public synchronized MaskFactory getMaskFactory()(Code)

Get the mask factory used throughout this application. This is used to create and retrieve input/list masks.

mask factory used throughout this application.



openSession
public PersistenceSession openSession() throws PersistenceException(Code)

Open a catalog session.


See Also:   com.ivata.mask.persistence.PersistenceManager.openSession



openSession
public PersistenceSession openSession(HttpSession webSessionParam) throws PersistenceException(Code)

Open a catalog session.


See Also:   com.ivata.mask.persistence.PersistenceManager.openSession



openSession
public PersistenceSession openSession(Object systemSession) throws PersistenceException(Code)
You can't use a system session in this simple demo. This method throws an exception of class UnsupportedOperationException.
Parameters:
  systemSession -
throws:
  PersistenceException -
See Also:   com.ivata.mask.persistence.PersistenceManager.openSession



remove
public void remove(PersistenceSession session, Class classParam, Serializable key) throws PersistenceException(Code)

Remove a value object from the system.


Parameters:
  session - open persistence session, used to remove the object.
Parameters:
  classParam - class of object to be retrieved. Must be a subclassof ValueObject.
Parameters:
  key - unique identifier of the object to retrieve.
throws:
  PersistenceException - thrown by the underlying persistencemechanism if the object cannot be removed for any reason.
See Also:   com.ivata.mask.persistence.PersistenceManager.remove



reset
public void reset()(Code)

Reset the catalog to its initial state.




setMaskFactory
public void setMaskFactory(MaskFactory factory)(Code)

Set the mask factory used throughout this application.


Parameters:
  factory - mask factory used throughout this application.



setPropertyValues
protected void setPropertyValues(ValueObject from, ValueObject to)(Code)

Override to set all property values from one value object to another.


Parameters:
  from - value object to take values from.
Parameters:
  to - value object to set values in.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

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