org.nuiton.wikitty.jdbc
Class WikittyStorageJDBC
java.lang.Object
org.nuiton.wikitty.jdbc.WikittyStorageJDBC
- All Implemented Interfaces:
- WikittyStorage
public class WikittyStorageJDBC
- extends Object
- implements WikittyStorage
- Version:
- $Revision: 1435 $
Last update: $Date: 2012-03-05 01:47:56 +0100 (lun, 05 mar 2012) $
by : $Author: bpoussin $
- Author:
- morin
|
Method Summary |
protected void |
checkTableOrCreation(WikittyTransaction tx)
test table existance or create them if necessary |
WikittyEvent |
clear(WikittyTransaction tx)
|
protected Wikitty |
constructWikitty(WikittyTransaction tx,
String id,
String version,
String extensionList,
ResultSet resultSet,
String... fqFieldName)
Create Wikitty from jdbc tables. |
WikittyEvent |
delete(WikittyTransaction tx,
Collection<String> ids)
|
boolean |
exists(WikittyTransaction tx,
String id)
|
protected String |
getColName(WikittyTypes type)
|
WikittyStorage.DataStatistic |
getDataStatistic(WikittyTransaction tx)
|
protected boolean |
isAcceptedField(Set<String> acceptedField,
String fqfieldName)
Test if fqfieldName is in acceptedField |
boolean |
isDeleted(WikittyTransaction tx,
String id)
|
Wikitty |
restore(WikittyTransaction tx,
String id,
String... fqFieldName)
|
void |
scanWikitties(WikittyTransaction tx,
WikittyStorage.Scanner scanner)
|
WikittyEvent |
store(WikittyTransaction tx,
Collection<Wikitty> wikitties,
boolean force)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
protected static org.apache.commons.logging.Log log
- to use log facility, just put in your code: log.info(\"...\");
jdbcQuery
protected final Properties jdbcQuery
- Properties file
config
protected org.nuiton.util.ApplicationConfig config
extensionStorage
protected WikittyExtensionStorage extensionStorage
WikittyStorageJDBC
public WikittyStorageJDBC(org.nuiton.util.ApplicationConfig config,
WikittyExtensionStorage extensionStorage)
checkTableOrCreation
protected void checkTableOrCreation(WikittyTransaction tx)
- test table existance or create them if necessary
getColName
protected String getColName(WikittyTypes type)
store
public WikittyEvent store(WikittyTransaction tx,
Collection<Wikitty> wikitties,
boolean force)
throws WikittyException
- Specified by:
store in interface WikittyStorage
- Throws:
WikittyException
exists
public boolean exists(WikittyTransaction tx,
String id)
- Specified by:
exists in interface WikittyStorage
isDeleted
public boolean isDeleted(WikittyTransaction tx,
String id)
- Specified by:
isDeleted in interface WikittyStorage
restore
public Wikitty restore(WikittyTransaction tx,
String id,
String... fqFieldName)
throws WikittyException
- Specified by:
restore in interface WikittyStorage
- Throws:
WikittyException
delete
public WikittyEvent delete(WikittyTransaction tx,
Collection<String> ids)
throws WikittyException
- Specified by:
delete in interface WikittyStorage
- Throws:
WikittyException
scanWikitties
public void scanWikitties(WikittyTransaction tx,
WikittyStorage.Scanner scanner)
- Specified by:
scanWikitties in interface WikittyStorage
constructWikitty
protected Wikitty constructWikitty(WikittyTransaction tx,
String id,
String version,
String extensionList,
ResultSet resultSet,
String... fqFieldName)
throws SQLException
- Create Wikitty from jdbc tables.
- Parameters:
id - the id of the wikitty to restoreversion - the version of the wikitty to restoreextensionList - the list of the extensions of the wikitty to restoreresulSet - the ResultSet as the result of the selection of the in the data tablefqFieldName - minimum field to restore
- Returns:
-
- Throws:
SQLException
isAcceptedField
protected boolean isAcceptedField(Set<String> acceptedField,
String fqfieldName)
- Test if fqfieldName is in acceptedField
- Parameters:
acceptedField - list of all accepted fieldfqfieldName - fully qualified field name with potential [n/m] at end
- Returns:
- if fqfieldName without potential [n/m] is in acceptedField or if acceptedField is empty
clear
public WikittyEvent clear(WikittyTransaction tx)
- Specified by:
clear in interface WikittyStorage
getDataStatistic
public WikittyStorage.DataStatistic getDataStatistic(WikittyTransaction tx)
- Specified by:
getDataStatistic in interface WikittyStorage
Copyright © 2009-2012 CodeLutin. All Rights Reserved.