Java Doc for BaseDbFlatStorage.java in  » ERP-CRM-Financial » sakai » org » sakaiproject » util » 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 » sakai » org.sakaiproject.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.sakaiproject.util.BaseDbFlatStorage

BaseDbFlatStorage
public class BaseDbFlatStorage (Code)

BaseDbFlatStorage is a class that stores Resources (of some type) in a database, provides (optional) locked access,
and generally implements a services "storage" class.
The service's storage class can extend this to provide covers to turn Resource and Edit into something more type specific to the service.

Note: the methods here are all "id" based, with the following assumptions:

  • just the Resource Id field is enough to distinguish one Resource from another
  • a resource's reference is based on no more than the resource id
  • a resource's id cannot change

In order to handle Unicode characters properly, the SQL statements executed by this class should not embed Unicode characters into the SQL statement text;
rather, Unicode values should be inserted as fields in a PreparedStatement. Databases handle Unicode better in fields.



Field Summary
protected  booleanm_caseInsensitive
     If set, we treat reasource ids as case insensitive.
protected  booleanm_locking
     If false, we are not doing any locking, else we are.
protected  Hashtablem_locks
     Locks (if used), keyed by reference, holding Edits.
protected  booleanm_locksAreInTable
     If true, we do our locks in the remote database using a separate locking table, otherwise we do them in the class.
protected  SqlReaderm_reader
     SqlReader to use when reading the record.
protected  Stringm_resourcePropertyTableName
     Table name for the resource properties.
protected  Stringm_resourceTableDbidField
     The extra db field for an integer 'db' id - auto-written on insert only.
protected  Stringm_resourceTableIdField
     The field in the resource table that holds the resource id.
protected  String[]m_resourceTableInsertFields
     The full set of fields in the table for insert - just field (not counting a dbid field).
protected  String[]m_resourceTableInsertValues
     The full set of value expressions for an insert - either null or ? or an expression - to match m_resourceTableInsertFields (not counting a dbid field).
protected  Stringm_resourceTableName
     Table name for resource records.
protected  String[]m_resourceTableReadFields
     The full set of fields in the table to read.
protected  Stringm_resourceTableSortField1
     The field in the resource table that is used for sorting (first sort).
protected  Stringm_resourceTableSortField2
     The field in the resource table that is used for sorting (second sort).
protected  String[]m_resourceTableUpdateFields
     The full set of fields in the table for update - can be field name only, or field=xxx expression.
protected  SqlServicem_sql
     Injected (by constructor) SqlService.

Constructor Summary
public  BaseDbFlatStorage(String resourceTableName, String resourceTableIdField, String[] resourceTableFields, String propertyTableName, boolean locksInTable, SqlReader reader, SqlService sqlService)
     Construct.

Method Summary
public  voidcancelResource(Edit edit)
     Cancel the changes and release the lock.
protected  StringcaseId(String id)
     Fix the case of resource ids to support case insensitive ids if enabled
Parameters:
  The - id to fix.
public  booleancheckResource(String id)
     Check if a Resource by this id exists.
Parameters:
  id - The id.
public  voidclose()
     Close.
public  voidcommitResource(Edit edit, Object fields, ResourceProperties props)
     Commit the changes and release the lock.
public  voidcommitResource(Edit edit, Object fields, ResourceProperties props, Object key)
     Commit the changes and release the lock - optionally in a transaction.
public  intcountAllResources()
    
public  intcountSelectedResources(String where, Object[] values)
     Count all Resources matching a SQL where clause.
public  intcountSelectedResources(String where, Object[] values, String join)
     Count all Resources matching a SQL where clause.
protected  voiddeleteProperties(Entity r, Object key)
     Remove all properties for this resource from the db.
public  EditeditResource(String id)
     Get a lock on the Resource with this id, or null if a lock cannot be gotten.
Parameters:
  id - The user id.
public  EditeditResource(Connection conn, String id)
     Get a lock on the Resource with this id, or null if a lock cannot be gotten.
Parameters:
  conn - The optional database connection to use.
Parameters:
  id - The user id.
protected  StringfieldList(String[] fields, String dbidField)
     Form a string of field, field, field - one for each item in the fields array.
Parameters:
  fields - The field names.
public  ListgetAllResources()
    
public  ListgetAllResources(int first, int last)
    
public  EntitygetResource(String id)
     Get the Resource with this id, or null if not found.
Parameters:
  id - The id.
public  EntitygetResource(Connection conn, String id)
     Get the Resource with this id, or null if not found.
Parameters:
  optional - connection to use.
Parameters:
  id - The id.
public  ListgetSelectedResources(String where, Object[] values)
    
public  ListgetSelectedResources(String where, String order, Object[] values)
    
public  ListgetSelectedResources(String where, String order, Object[] values, String join)
    
public  ListgetSelectedResources(String where, Object[] values, int first, int last)
     Get all Resources matching a SQL where clause.
public  ListgetSelectedResources(String where, String order, Object[] values, int first, int last)
     Get all Resources matching a SQL where clause.
public  ListgetSelectedResources(String where, String order, Object[] values, int first, int last, String join)
     Get all Resources matching a SQL where clause.
public  booleaninsertResource(String id, Object[] fields, Connection conn)
     Add a new Resource with this id - no edit is returned, no lock is held.
Parameters:
  id - The id.
Parameters:
  fields - The fields to write.
public  voidopen()
     Open and be ready to read / write.
public  EditputResource(String id, Object[] fields)
     Add a new Resource with this id.
Parameters:
  id - The id.
Parameters:
  fields - The fields to write.
public  EditputResource(Connection conn, String id, Object[] fields)
     putResource with optional connection to use.
Parameters:
  conn - The optional database connection to use.
Parameters:
  id - The id.
Parameters:
  fields - The fields to write.
protected  StringqualifyField(String field, String table)
     Qualify the fiel with the table name, if it's a field.
Parameters:
  field - The field.
Parameters:
  table - The table name.
public  voidreadProperties(Entity r, ResourcePropertiesEdit p)
    
public  voidreadProperties(Integer dbid, ResourcePropertiesEdit p)
    
public  voidreadProperties(Connection conn, Entity r, ResourcePropertiesEdit p)
    
public  voidreadProperties(Connection conn, Integer dbid, ResourcePropertiesEdit p)
    
public  voidreadProperties(Connection conn, String table, String idField, Object id, ResourcePropertiesEdit p)
     Read in properties from the database.
public  voidreadProperties(Connection conn, String table, String idField, Object id, Properties p)
     Read in properties from the database.
public  voidremoveResource(Edit edit)
     Remove this (locked) Resource.
public  voidremoveResource(Edit edit, Object key)
     Remove this (locked) Resource.
protected  voidremoveResourceTx(Edit edit, Object key)
     Transaction code to remove a resource.
protected  voidsetCaseInsensitivity(boolean setting)
     Enable / disable case insensitive ids.
public  voidsetDbidField(String dbidField)
    
public  voidsetLocking(boolean value)
     Set if we are doing locking or not.
public  voidsetSortField(String sortField1, String sortField2)
     Set the sort field to be something perhaps other than the default of the id field.
public  voidsetWriteFields(String[] updateFields, String[] insertFields, String[] insertValues)
     Establish a different set of fields for inserts and updated.
protected  Object[]updateFields(Object[] fields)
    
protected  StringupdateSet(String[] fields)
     Form a string of n name=?, for sql update set statements, one for each item in the values array, or an empty string if null.
Parameters:
  values - The values to be inserted into the sql statement.
protected  StringvaluesParams(String[] fields, String dbidField)
     Form a string of n question marks with commas, for sql value statements, one for each item in the values array, or an empty string if null.
public  voidwriteProperties(Entity r, ResourceProperties props)
     Replace any properties for this resource with the resource's current set of properties.
public  voidwriteProperties(Entity r, ResourceProperties props, Object key)
     Replace any properties for this resource with the resource's current set of properties.
public  voidwriteProperties(String table, String idField, Object id, String extraIdField, String extraId, ResourceProperties props)
    
public  voidwriteProperties(String table, String idField, Object id, String extraIdField, String extraId, ResourceProperties props, boolean deleteFirst)
     Replace any properties for this resource with the resource's current set of properties.
public  voidwriteProperties(String table, String idField, Object id, String extraIdField, String extraId, Properties props)
     Replace any properties for this resource with the resource's current set of properties.
public  voidwriteProperties(String table, String idField, Object id, String extraIdField, String extraId, Properties props, boolean deleteFirst)
     Replace any properties for this resource with the resource's current set of properties.
protected  voidwritePropertiesTx(String table, String idField, Object id, String extraIdField, String extraId, ResourceProperties props, boolean deleteFirst)
     The transaction code that writes the properties.
protected  voidwritePropertiesTx(String table, String idField, Object id, String extraIdField, String extraId, Properties props, boolean deleteFirst)
     The transaction code for writing properties.

Field Detail
m_caseInsensitive
protected boolean m_caseInsensitive(Code)
If set, we treat reasource ids as case insensitive.



m_locking
protected boolean m_locking(Code)
If false, we are not doing any locking, else we are.



m_locks
protected Hashtable m_locks(Code)
Locks (if used), keyed by reference, holding Edits.



m_locksAreInTable
protected boolean m_locksAreInTable(Code)
If true, we do our locks in the remote database using a separate locking table, otherwise we do them in the class.



m_reader
protected SqlReader m_reader(Code)
SqlReader to use when reading the record.



m_resourcePropertyTableName
protected String m_resourcePropertyTableName(Code)
Table name for the resource properties.



m_resourceTableDbidField
protected String m_resourceTableDbidField(Code)
The extra db field for an integer 'db' id - auto-written on insert only.



m_resourceTableIdField
protected String m_resourceTableIdField(Code)
The field in the resource table that holds the resource id.



m_resourceTableInsertFields
protected String[] m_resourceTableInsertFields(Code)
The full set of fields in the table for insert - just field (not counting a dbid field).



m_resourceTableInsertValues
protected String[] m_resourceTableInsertValues(Code)
The full set of value expressions for an insert - either null or ? or an expression - to match m_resourceTableInsertFields (not counting a dbid field).



m_resourceTableName
protected String m_resourceTableName(Code)
Table name for resource records.



m_resourceTableReadFields
protected String[] m_resourceTableReadFields(Code)
The full set of fields in the table to read.



m_resourceTableSortField1
protected String m_resourceTableSortField1(Code)
The field in the resource table that is used for sorting (first sort).



m_resourceTableSortField2
protected String m_resourceTableSortField2(Code)
The field in the resource table that is used for sorting (second sort).



m_resourceTableUpdateFields
protected String[] m_resourceTableUpdateFields(Code)
The full set of fields in the table for update - can be field name only, or field=xxx expression.



m_sql
protected SqlService m_sql(Code)
Injected (by constructor) SqlService.




Constructor Detail
BaseDbFlatStorage
public BaseDbFlatStorage(String resourceTableName, String resourceTableIdField, String[] resourceTableFields, String propertyTableName, boolean locksInTable, SqlReader reader, SqlService sqlService)(Code)
Construct.
Parameters:
  resourceTableName - Table name for resources.
Parameters:
  resourceTableIdField - The field in the resource table that holds the id.
Parameters:
  resourceTableFields - The complete set of fields to read / write for the resource.
Parameters:
  propertyTableName - The table name for standard property support.
Parameters:
  locksInTable - If true, we do our locks in the remote database in a locks table, otherwise we do them here.
Parameters:
  reader - A SqlReader which will produce Edits given fields read from the table.
Parameters:
  sqlService - The SqlService.




Method Detail
cancelResource
public void cancelResource(Edit edit)(Code)
Cancel the changes and release the lock.
Parameters:
  user - The Edit to cancel.



caseId
protected String caseId(String id)(Code)
Fix the case of resource ids to support case insensitive ids if enabled
Parameters:
  The - id to fix. The id, case modified as needed.



checkResource
public boolean checkResource(String id)(Code)
Check if a Resource by this id exists.
Parameters:
  id - The id. true if a Resource by this id exists, false if not.



close
public void close()(Code)
Close.



commitResource
public void commitResource(Edit edit, Object fields, ResourceProperties props)(Code)
Commit the changes and release the lock.
Parameters:
  edit - The Edit to commit.
Parameters:
  fields - The set of fields to write to the db, plus the id field as it is to be written again at the end.



commitResource
public void commitResource(Edit edit, Object fields, ResourceProperties props, Object key)(Code)
Commit the changes and release the lock - optionally in a transaction.
Parameters:
  edit - The Edit to commit.
Parameters:
  fields - The set of fields to write to the db, plus the id field as it is to be written again at the end.
Parameters:
  key - The object key used to relate to the properties - if null, we use the object id to relate.



countAllResources
public int countAllResources()(Code)



countSelectedResources
public int countSelectedResources(String where, Object[] values)(Code)
Count all Resources matching a SQL where clause.
Parameters:
  where - The SQL where clause with bind variables indicated (not including the preceeding "where ").
Parameters:
  values - The bind values The count of all Resources that meet the criteria.



countSelectedResources
public int countSelectedResources(String where, Object[] values, String join)(Code)
Count all Resources matching a SQL where clause.
Parameters:
  where - The SQL where clause with bind variables indicated (not including the preceeding "where ").
Parameters:
  values - The bind values
Parameters:
  join - a single or comma separated set of other tables to join in the from clause The count of all Resources that meet the criteria.



deleteProperties
protected void deleteProperties(Entity r, Object key)(Code)
Remove all properties for this resource from the db.
Parameters:
  r - The resource for which properties are to be deleted.



editResource
public Edit editResource(String id)(Code)
Get a lock on the Resource with this id, or null if a lock cannot be gotten.
Parameters:
  id - The user id. The locked Resource with this id, or null if this records cannot be locked.



editResource
public Edit editResource(Connection conn, String id)(Code)
Get a lock on the Resource with this id, or null if a lock cannot be gotten.
Parameters:
  conn - The optional database connection to use.
Parameters:
  id - The user id. The locked Resource with this id, or null if this records cannot be locked.



fieldList
protected String fieldList(String[] fields, String dbidField)(Code)
Form a string of field, field, field - one for each item in the fields array.
Parameters:
  fields - The field names. A string of field, field, field - one for each item in the fields array.



getAllResources
public List getAllResources()(Code)



getAllResources
public List getAllResources(int first, int last)(Code)



getResource
public Entity getResource(String id)(Code)
Get the Resource with this id, or null if not found.
Parameters:
  id - The id. The Resource with this id, or null if not found.



getResource
public Entity getResource(Connection conn, String id)(Code)
Get the Resource with this id, or null if not found.
Parameters:
  optional - connection to use.
Parameters:
  id - The id. The Resource with this id, or null if not found.



getSelectedResources
public List getSelectedResources(String where, Object[] values)(Code)
Get all Resources matching a SQL where clause, with sorting
Parameters:
  where - The SQL where clause with bind variables indicated (not including the preceeding "where ").
Parameters:
  values - The bind values The list of all Resources that meet the criteria.



getSelectedResources
public List getSelectedResources(String where, String order, Object[] values)(Code)
Get all Resources matching a SQL where clause, with sorting and ordering
Parameters:
  where - The SQL where clause with bind variables indicated (not including the preceeding "where ").
Parameters:
  order - the SQL order clause (not including the preceeding "order by ").
Parameters:
  values - The bind values The list of all Resources that meet the criteria.



getSelectedResources
public List getSelectedResources(String where, String order, Object[] values, String join)(Code)
Get all Resources matching a SQL where clause, with sorting and ordering
Parameters:
  where - The SQL where clause with bind variables indicated (not including the preceeding "where ").
Parameters:
  order - the SQL order clause (not including the preceeding "order by ").
Parameters:
  values - The bind values
Parameters:
  join - a single or comma separated set of other tables to join in the from clause The list of all Resources that meet the criteria.



getSelectedResources
public List getSelectedResources(String where, Object[] values, int first, int last)(Code)
Get all Resources matching a SQL where clause.
Parameters:
  where - The SQL where clause with bind variables indicated (not including the preceeding "where ".
Parameters:
  values - The bind values The list of all Resources that meet the criteria.



getSelectedResources
public List getSelectedResources(String where, String order, Object[] values, int first, int last)(Code)
Get all Resources matching a SQL where clause.
Parameters:
  where - The SQL where clause with bind variables indicated (not including the preceeding "where ".
Parameters:
  order - the SQL order clause (not including the preceeding "order by ").
Parameters:
  values - The bind values The list of all Resources that meet the criteria.



getSelectedResources
public List getSelectedResources(String where, String order, Object[] values, int first, int last, String join)(Code)
Get all Resources matching a SQL where clause.
Parameters:
  where - The SQL where clause with bind variables indicated (not including the preceeding "where ".
Parameters:
  order - the SQL order clause (not including the preceeding "order by ").
Parameters:
  values - The bind values
Parameters:
  join - a single or comma separated set of other tables to join in the from clause The list of all Resources that meet the criteria.



insertResource
public boolean insertResource(String id, Object[] fields, Connection conn)(Code)
Add a new Resource with this id - no edit is returned, no lock is held.
Parameters:
  id - The id.
Parameters:
  fields - The fields to write. True if successful, false if not.



open
public void open()(Code)
Open and be ready to read / write.



putResource
public Edit putResource(String id, Object[] fields)(Code)
Add a new Resource with this id.
Parameters:
  id - The id.
Parameters:
  fields - The fields to write. The locked Resource object with this id, or null if the id is in use.



putResource
public Edit putResource(Connection conn, String id, Object[] fields)(Code)
putResource with optional connection to use.
Parameters:
  conn - The optional database connection to use.
Parameters:
  id - The id.
Parameters:
  fields - The fields to write. The locked Resource object with this id, or null if the id is in use.



qualifyField
protected String qualifyField(String field, String table)(Code)
Qualify the fiel with the table name, if it's a field.
Parameters:
  field - The field.
Parameters:
  table - The table name. The field name qualified with the table name.



readProperties
public void readProperties(Entity r, ResourcePropertiesEdit p)(Code)
Read in properties from the database - when the properties and the main table are related by the id
Parameters:
  r - The resource for which properties are to be read.
Parameters:
  p - The properties object to fill.



readProperties
public void readProperties(Integer dbid, ResourcePropertiesEdit p)(Code)
Read in properties from the database - when the properties and the main table are related by the dbid
Parameters:
  key - The resource key.
Parameters:
  p - The properties object to fill.



readProperties
public void readProperties(Connection conn, Entity r, ResourcePropertiesEdit p)(Code)
Read in properties from the database - when the properties and the main table are related by the id
Parameters:
  r - The resource for which properties are to be read.
Parameters:
  p - The properties object to fill.



readProperties
public void readProperties(Connection conn, Integer dbid, ResourcePropertiesEdit p)(Code)
Read in properties from the database - when the properties and the main table are related by the dbid
Parameters:
  key - The resource key.
Parameters:
  p - The properties object to fill.



readProperties
public void readProperties(Connection conn, String table, String idField, Object id, ResourcePropertiesEdit p)(Code)
Read in properties from the database.
Parameters:
  r - The resource for which properties are to be read.



readProperties
public void readProperties(Connection conn, String table, String idField, Object id, Properties p)(Code)
Read in properties from the database.
Parameters:
  r - The resource for which properties are to be read.



removeResource
public void removeResource(Edit edit)(Code)
Remove this (locked) Resource.
Parameters:
  user - The Edit to remove.



removeResource
public void removeResource(Edit edit, Object key)(Code)
Remove this (locked) Resource.
Parameters:
  edit - The Edit to remove.
Parameters:
  key - The key to relate resource to properties, of if null, id is assumed.



removeResourceTx
protected void removeResourceTx(Edit edit, Object key)(Code)
Transaction code to remove a resource.



setCaseInsensitivity
protected void setCaseInsensitivity(boolean setting)(Code)
Enable / disable case insensitive ids.
Parameters:
  setting - true to set case insensitivity, false to set case sensitivity.



setDbidField
public void setDbidField(String dbidField)(Code)
Set a field that will be read after the field list, and
Parameters:
  dbidField -



setLocking
public void setLocking(boolean value)(Code)
Set if we are doing locking or not.
Parameters:
  value - If true, we should do locking, else not.



setSortField
public void setSortField(String sortField1, String sortField2)(Code)
Set the sort field to be something perhaps other than the default of the id field.
Parameters:
  sortField1 - The field name to use for sorting.
Parameters:
  sortField2 - Optional second sort field.



setWriteFields
public void setWriteFields(String[] updateFields, String[] insertFields, String[] insertValues)(Code)
Establish a different set of fields for inserts and updated.
Parameters:
  resourceTableFields - The complete set of fields to write for the resource (not counting a dbid field if needed).



updateFields
protected Object[] updateFields(Object[] fields)(Code)
For update, we don't want to include the first, primary key, field, so strip it off
Parameters:
  fields - The full set of fields The fields with the first removed



updateSet
protected String updateSet(String[] fields)(Code)
Form a string of n name=?, for sql update set statements, one for each item in the values array, or an empty string if null.
Parameters:
  values - The values to be inserted into the sql statement. A sql statement fragment for the values part of an insert, one for each value in the array.



valuesParams
protected String valuesParams(String[] fields, String dbidField)(Code)
Form a string of n question marks with commas, for sql value statements, one for each item in the values array, or an empty string if null. If the fields are "(...)" values, use these instead of ?.
Parameters:
  values - The values to be inserted into the sql statement. A sql statement fragment for the values part of an insert, one for each value in the array.



writeProperties
public void writeProperties(Entity r, ResourceProperties props)(Code)
Replace any properties for this resource with the resource's current set of properties.
Parameters:
  conn - optional database connection to use.
Parameters:
  r - The resource for which properties are to be written.
Parameters:
  props - The properties to write.



writeProperties
public void writeProperties(Entity r, ResourceProperties props, Object key)(Code)
Replace any properties for this resource with the resource's current set of properties.
Parameters:
  conn - optional database connection to use.
Parameters:
  r - The resource for which properties are to be written.
Parameters:
  props - The properties to write.
Parameters:
  key - The key used to relate the props to the resource.



writeProperties
public void writeProperties(String table, String idField, Object id, String extraIdField, String extraId, ResourceProperties props)(Code)



writeProperties
public void writeProperties(String table, String idField, Object id, String extraIdField, String extraId, ResourceProperties props, boolean deleteFirst)(Code)
Replace any properties for this resource with the resource's current set of properties.
Parameters:
  r - The resource for which properties are to be written.



writeProperties
public void writeProperties(String table, String idField, Object id, String extraIdField, String extraId, Properties props)(Code)
Replace any properties for this resource with the resource's current set of properties.
Parameters:
  r - The resource for which properties are to be written.



writeProperties
public void writeProperties(String table, String idField, Object id, String extraIdField, String extraId, Properties props, boolean deleteFirst)(Code)
Replace any properties for this resource with the resource's current set of properties.
Parameters:
  r - The resource for which properties are to be written.



writePropertiesTx
protected void writePropertiesTx(String table, String idField, Object id, String extraIdField, String extraId, ResourceProperties props, boolean deleteFirst)(Code)
The transaction code that writes the properties.
Parameters:
  r - The resource for which properties are to be written.



writePropertiesTx
protected void writePropertiesTx(String table, String idField, Object id, String extraIdField, String extraId, Properties props, boolean deleteFirst)(Code)
The transaction code for writing properties.
Parameters:
  r - The resource for which properties are to be written.



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.