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: 366 $
Last update: $Date: 2010-09-28 18:16:45 +0200 (mar., 28 sept. 2010) $
by : $Author: echatellier $
- Author:
- morin
|
Method Summary |
void |
clear(WikittyTransaction transaction)
|
protected Wikitty |
constructWikitty(WikittyTransaction transaction,
String id,
String version,
String extensionList,
ResultSet resultSet,
String... fqFieldName)
Create Wikitty from jdbc tables. |
UpdateResponse |
delete(WikittyTransaction transaction,
Collection<String> ids)
|
boolean |
exists(WikittyTransaction transaction,
String id)
|
protected String |
getColName(FieldType.TYPE type)
|
protected boolean |
isAcceptedField(Set<String> acceptedField,
String fqfieldName)
Test if fqfieldName is in acceptedField |
boolean |
isDeleted(WikittyTransaction transaction,
String id)
|
Wikitty |
restore(WikittyTransaction transaction,
String id,
String... fqFieldName)
|
void |
scanWikitties(WikittyTransaction transaction,
WikittyStorage.Scanner scanner)
|
UpdateResponse |
store(WikittyTransaction transaction,
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(\"...\");
conf
protected final Properties conf
- Properties file
extensionStorage
protected WikittyExtensionStorage extensionStorage
WikittyStorageJDBC
public WikittyStorageJDBC(WikittyExtensionStorage extensionStorage)
WikittyStorageJDBC
public WikittyStorageJDBC(WikittyExtensionStorage extensionStorage,
Properties properties)
getColName
protected String getColName(FieldType.TYPE type)
store
public UpdateResponse store(WikittyTransaction transaction,
Collection<Wikitty> wikitties,
boolean force)
throws WikittyException
- Specified by:
store in interface WikittyStorage
- Throws:
WikittyException
exists
public boolean exists(WikittyTransaction transaction,
String id)
- Specified by:
exists in interface WikittyStorage
isDeleted
public boolean isDeleted(WikittyTransaction transaction,
String id)
- Specified by:
isDeleted in interface WikittyStorage
restore
public Wikitty restore(WikittyTransaction transaction,
String id,
String... fqFieldName)
throws WikittyException
- Specified by:
restore in interface WikittyStorage
- Throws:
WikittyException
delete
public UpdateResponse delete(WikittyTransaction transaction,
Collection<String> ids)
throws WikittyException
- Specified by:
delete in interface WikittyStorage
- Throws:
WikittyException
scanWikitties
public void scanWikitties(WikittyTransaction transaction,
WikittyStorage.Scanner scanner)
- Specified by:
scanWikitties in interface WikittyStorage
constructWikitty
protected Wikitty constructWikitty(WikittyTransaction transaction,
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 void clear(WikittyTransaction transaction)
- Specified by:
clear in interface WikittyStorage
Copyright © 2009-2010 CodeLutin. All Rights Reserved.