|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.partnersoft.modules.inspection.sql.SqlInspectionStore
public class SqlInspectionStore
| Constructor Summary | |
|---|---|
SqlInspectionStore(com.partnersoft.system.Module module,
InspectionKit kit,
com.partnersoft.sql.DatabaseConnectionConfig database,
com.partnersoft.cog.CogSchema schema,
java.lang.String inspectionType)
|
|
| Method Summary | |
|---|---|
void |
addIndexing()
|
void |
buildTables()
Creates the Admin table and inspection table. |
int |
checkOutJobs(InspectionStore centralStore,
java.lang.String user)
Checks out only records with assigned_to values == user name or uses where clause returned by preCheckout script. |
int |
checkOutJobsWithQuery(InspectionStore centralStore,
java.lang.String whereClause)
Checks out only records with assigned_to values == user name. |
void |
connect()
|
boolean |
databaseExists()
Checks if the database this store has configuration for exists. |
void |
disconnect()
|
java.lang.String |
getBlobTableName()
|
com.partnersoft.sql.DatabaseConnection |
getConnection()
|
com.partnersoft.sql.DatabaseConnectionConfig |
getDatabase()
|
java.lang.String |
getFieldTableName()
|
java.lang.String |
getInspectionTableName()
|
java.lang.String |
getInspectionType()
|
java.lang.String |
getName()
|
java.lang.String |
getPicklistTableName()
|
java.lang.String |
getPublishingTableName()
|
java.lang.String |
getSyncTableName()
|
com.partnersoft.data.DateAndTime |
lastSynchronizationWith(java.lang.String storeName)
|
void |
matchDatabaseToSchema(java.lang.String tableName)
Changes database to match schema. |
com.partnersoft.io.DataRecordSource |
query(java.lang.String sql)
Queries this store using the passed String as an SQL statement |
com.partnersoft.io.DataRecordSource |
query(java.lang.String sql,
int fetchSize)
Queries this store using the passed String as an SQL statement Uses a streaming result set. |
com.partnersoft.io.DataRecordSource |
queryBlobs()
Return record source for all Blobs in this store. |
com.partnersoft.io.DataRecordSource |
queryBlobs(int fetchSize)
Return record source for all Blobs in this store. |
com.partnersoft.io.DataRecordSource |
queryBlobs(java.lang.String whereClause)
Queries this store using the passed String as an SQL where clause. |
com.partnersoft.io.DataRecordSource |
queryBlobs(java.lang.String whereClause,
int fetchSize)
Queries this store using the passed String as an SQL where clause. |
com.partnersoft.io.DataRecordSource |
queryInspections()
Return record source for all inspections in this store. |
com.partnersoft.io.DataRecordSource |
queryInspections(int fetchSize)
Return record source for all inspections in this store. |
com.partnersoft.io.DataRecordSource |
queryInspections(java.lang.String whereClause)
Queries this store using the passed String as an SQL where clause. |
com.partnersoft.io.DataRecordSource |
queryInspections(java.lang.String whereClause,
int fetchSize)
Queries this store using the passed String as an SQL where clause. |
void |
removeIndexing()
|
void |
removeInspection(java.lang.String guid)
|
Inspection |
retrieveInspection(java.lang.String guid)
Return the stored inspection with this guid. |
void |
storeInspection(Inspection inspection)
Stores inspection in the store. |
int |
synchronize(InspectionStore centralStore)
Does a single synchronize. |
com.partnersoft.data.Naming<java.lang.Object> |
synchronizeWithAllRecords(InspectionStore centralStore)
Uploads all modified content, clears local inspection and blob databases, then downloads all inspections and blobs. |
com.partnersoft.data.Naming<java.lang.Object> |
synchronizeWithCheckOut(InspectionStore centralStore)
Updates all modified records on central store, and downloads all records from central store with module_assigned_to. |
void |
updateInspection(java.lang.String guid,
com.partnersoft.data.Naming<java.lang.Object> data)
|
void |
updateInspection(java.lang.String guid,
java.lang.Object... data)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SqlInspectionStore(com.partnersoft.system.Module module,
InspectionKit kit,
com.partnersoft.sql.DatabaseConnectionConfig database,
com.partnersoft.cog.CogSchema schema,
java.lang.String inspectionType)
| Method Detail |
|---|
public boolean databaseExists()
databaseExists in interface InspectionStorepublic void matchDatabaseToSchema(java.lang.String tableName)
matchDatabaseToSchema in interface InspectionStoretableName - - Name of table to look at.
public void connect()
throws java.sql.SQLException
connect in interface InspectionStorejava.sql.SQLException
public void disconnect()
throws java.sql.SQLException
disconnect in interface InspectionStorejava.sql.SQLExceptionpublic java.lang.String getInspectionType()
getInspectionType in interface InspectionStorepublic java.lang.String getName()
getName in interface InspectionStore
public com.partnersoft.data.DateAndTime lastSynchronizationWith(java.lang.String storeName)
throws java.io.IOException,
java.sql.SQLException
lastSynchronizationWith in interface InspectionStorejava.io.IOException
java.sql.SQLException
public void removeInspection(java.lang.String guid)
throws java.io.IOException,
java.sql.SQLException
removeInspection in interface InspectionStorejava.io.IOException
java.sql.SQLException
public Inspection retrieveInspection(java.lang.String guid)
throws java.io.IOException,
java.sql.SQLException
InspectionStore
retrieveInspection in interface InspectionStorejava.io.IOException
java.sql.SQLExceptionpublic void removeIndexing()
public void addIndexing()
public void storeInspection(Inspection inspection)
throws java.io.IOException,
java.sql.SQLException
storeInspection in interface InspectionStorejava.io.IOException
java.sql.SQLException
public int checkOutJobsWithQuery(InspectionStore centralStore,
java.lang.String whereClause)
throws java.io.IOException,
java.sql.SQLException
InspectionStore
Where clause is appended to SQL of format 'Select * from
checkOutJobsWithQuery in interface InspectionStore
centralStore - - hub database.whereClause - - SQL where clause to execute.
java.io.IOException
java.sql.SQLException
public int checkOutJobs(InspectionStore centralStore,
java.lang.String user)
throws java.io.IOException,
java.sql.SQLException
InspectionStore
checkOutJobs in interface InspectionStorejava.io.IOException
java.sql.SQLException
public com.partnersoft.data.Naming<java.lang.Object> synchronizeWithCheckOut(InspectionStore centralStore)
throws java.io.IOException,
java.sql.SQLException
InspectionStore
synchronizeWithCheckOut in interface InspectionStorecentralStore - - Store to move updated records to.
java.io.IOException
java.sql.SQLException
public com.partnersoft.data.Naming<java.lang.Object> synchronizeWithAllRecords(InspectionStore centralStore)
throws java.io.IOException,
java.sql.SQLException
synchronizeWithAllRecords in interface InspectionStorecentralStore - - the InspectionStore to synchronize with and download all inspections from.
java.io.IOException
java.sql.SQLException
public int synchronize(InspectionStore centralStore)
throws java.io.IOException,
java.sql.SQLException
synchronize in interface InspectionStorecentralStore - - InspectionStore to synch to.
java.io.IOException
java.sql.SQLException
public void buildTables()
throws java.sql.SQLException
InspectionStore
buildTables in interface InspectionStorejava.sql.SQLException
public com.partnersoft.io.DataRecordSource queryInspections()
throws java.sql.SQLException
InspectionStore
queryInspections in interface InspectionStorejava.sql.SQLException
public com.partnersoft.io.DataRecordSource queryInspections(int fetchSize)
throws java.sql.SQLException
InspectionStore
queryInspections in interface InspectionStorefetchSize - - number of records to hold in memory at a time.
java.sql.SQLException
public com.partnersoft.io.DataRecordSource query(java.lang.String sql)
throws java.sql.SQLException
InspectionStore
query in interface InspectionStoresql - - query SQL to execute
java.sql.SQLException - - When SQL badness occurs.
public com.partnersoft.io.DataRecordSource query(java.lang.String sql,
int fetchSize)
throws java.sql.SQLException
InspectionStore
query in interface InspectionStoresql - - query SQL to executefetchSize - - number of records to hold in memory at a time.
java.sql.SQLException - - When SQL badness occurs.
public com.partnersoft.io.DataRecordSource queryBlobs()
throws java.sql.SQLException
InspectionStore
queryBlobs in interface InspectionStorejava.sql.SQLException
public com.partnersoft.io.DataRecordSource queryBlobs(int fetchSize)
throws java.sql.SQLException
InspectionStore
queryBlobs in interface InspectionStorefetchSize - - number of records to hold in memory at a time.
java.sql.SQLException
public com.partnersoft.io.DataRecordSource queryInspections(java.lang.String whereClause)
throws java.sql.SQLException
InspectionStore
queryInspections in interface InspectionStorejava.sql.SQLException
public com.partnersoft.io.DataRecordSource queryInspections(java.lang.String whereClause,
int fetchSize)
throws java.sql.SQLException
InspectionStore
queryInspections in interface InspectionStorewhereClause - - Sql where clause to use.fetchSize - - number of records to hold in memory at a time.
java.sql.SQLException
public com.partnersoft.io.DataRecordSource queryBlobs(java.lang.String whereClause)
throws java.sql.SQLException
InspectionStore
queryBlobs in interface InspectionStorewhereClause - - Sql where clause to use.
java.sql.SQLException
public com.partnersoft.io.DataRecordSource queryBlobs(java.lang.String whereClause,
int fetchSize)
throws java.sql.SQLException
InspectionStore
queryBlobs in interface InspectionStorewhereClause - - Sql where clause to use.fetchSize - - number of records to hold in memory at a time.
java.sql.SQLException
public void updateInspection(java.lang.String guid,
com.partnersoft.data.Naming<java.lang.Object> data)
throws java.io.IOException,
java.sql.SQLException
updateInspection in interface InspectionStorejava.io.IOException
java.sql.SQLException
public void updateInspection(java.lang.String guid,
java.lang.Object... data)
throws java.io.IOException,
java.sql.SQLException
updateInspection in interface InspectionStorejava.io.IOException
java.sql.SQLExceptionpublic java.lang.String getInspectionTableName()
getInspectionTableName in interface InspectionStorepublic java.lang.String getSyncTableName()
getSyncTableName in interface InspectionStorepublic java.lang.String getBlobTableName()
getBlobTableName in interface InspectionStorepublic java.lang.String getFieldTableName()
getFieldTableName in interface InspectionStorepublic java.lang.String getPicklistTableName()
getPicklistTableName in interface InspectionStorepublic java.lang.String getPublishingTableName()
getPublishingTableName in interface InspectionStorepublic com.partnersoft.sql.DatabaseConnection getConnection()
public com.partnersoft.sql.DatabaseConnectionConfig getDatabase()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||