Java Doc for PropertyStorageStrategy.java in  » Portal » mypersonalizer » es » udc » mypersonalizer » kernel » model » repository » sql » storers » 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 » Portal » mypersonalizer » es.udc.mypersonalizer.kernel.model.repository.sql.storers 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


es.udc.mypersonalizer.kernel.model.repository.sql.storers.PropertyStorageStrategy

All known Subclasses:   es.udc.mypersonalizer.kernel.model.repository.sql.storers.RelationalPropertyStorageStrategy,  es.udc.mypersonalizer.kernel.model.repository.sql.storers.SerializationPropertyStorageStrategy,
PropertyStorageStrategy
public interface PropertyStorageStrategy (Code)
This interface specifies a strategy ("strategy" desing pattern) to access and maniputate properties on the database. A property is identified by a Map, mapping Strings to Objects. The Strings make up the key, and the Objects are their values. This feature allows to use strings or numbers as values for key fields. If fact, the values of the keys can only be one of the following ones: java.lang.Byte, java.lang.Short, java.lang.Integer, java.lang.Float, java.lang.Double and java.lang.String. No check will be done.

A "storer" class will retrieve the policy to be used by means of PropertyStorageStrategyRegistrySingleton, and will delegate on it in order to access or manipulate the corresponding property.
author:
   Fernando Bellas
since:
   1.0





Method Summary
 voidaddProperty(Connection connection, Map key, Property property)
     Adds a property identified by its key from the database.
 MapfindPropertiesByRange(Connection connection, List keys, int offset, int size)
     Extracts a property range by using the key fields.
Parameters:
  connection - the connection to the database
Parameters:
  keys - the key columns as a list of Strings
Parameters:
  offset - the number of initial properties to be skipped.
 PropertyfindProperty(Connection connection, Map key)
     Extracts a property identified by its key from the database.
 voidremoveProperty(Connection connection, Map key)
     Removes the property identified by a given key from the database.
 voidsetMetainfo(MetaService metainfo)
     Sets the metainformation needed for the strategy to work.
 voidupdateProperty(Connection connection, Map key, Property property)
     Updates a property identified by its key from the database.



Method Detail
addProperty
void addProperty(Connection connection, Map key, Property property) throws InternalErrorException, DuplicateInstanceException(Code)
Adds a property identified by its key from the database.
Parameters:
  connection - the connection to the database
Parameters:
  key - the map with the key columns and their corresponding values
Parameters:
  property - the property to be inserted
throws:
  InternalErrorException - if a failure is detected.
throws:
  DuplicateInstanceException - if there already existed a property withsuch a key



findPropertiesByRange
Map findPropertiesByRange(Connection connection, List keys, int offset, int size) throws InternalErrorException(Code)
Extracts a property range by using the key fields.
Parameters:
  connection - the connection to the database
Parameters:
  keys - the key columns as a list of Strings
Parameters:
  offset - the number of initial properties to be skipped. Thisparameter must be greather or equals than 0
Parameters:
  size - the number of properties to be extracted the property range as a map of (Map, Property).The map contains the key fields and their values for eachproperty. If the map size is less than the parameter "size"that means that there are no more properties to read.
throws:
  InternalErrorException - if a failure is detected.



findProperty
Property findProperty(Connection connection, Map key) throws InternalErrorException, InstanceNotFoundException(Code)
Extracts a property identified by its key from the database.
Parameters:
  connection - the connection to the database
Parameters:
  key - the map with the key columns and their corresponding values the Property extracted from the result set
throws:
  InternalErrorException - if a failure is detected.
throws:
  IntanceNotFoundException - if the property identified by the key doesnot exist



removeProperty
void removeProperty(Connection connection, Map key) throws InternalErrorException, InstanceNotFoundException(Code)
Removes the property identified by a given key from the database.
Parameters:
  connection - the connection to the database
Parameters:
  key - the map with the key columns and their corresponding values
throws:
  InternalErrorException - if a failure is detected.
throws:
  InstanceNotFoundException - if the property identified by the key doesnot exist



setMetainfo
void setMetainfo(MetaService metainfo)(Code)
Sets the metainformation needed for the strategy to work.
Parameters:
  metainfo - the Meatinformation needed.



updateProperty
void updateProperty(Connection connection, Map key, Property property) throws InternalErrorException, InstanceNotFoundException(Code)
Updates a property identified by its key from the database.
Parameters:
  connection - the connection to the database
Parameters:
  key - the map with the key columns and their corresponding values
Parameters:
  property - the property to be updated
throws:
  InternalErrorException - if a failure is detected.
throws:
  InstanceNotFoundException - if the property identified by the key doesnot exist



w___w_w_.__jav__a2s__.___c_o_m_ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.