public class PluginSession extends Object
| Modifier and Type | Field and Description |
|---|---|
protected PreparedStatement |
childrenTaxonPreparedStatement |
protected PreparedStatement |
commonNameFromScientificNamePreparedStatement |
protected PreparedStatement |
commonNamePreparedStatement |
protected Connection |
connection |
protected DatabaseCredential |
databaseCredential |
protected PreparedStatement |
datasetPerIdPreparedStatement |
protected PreparedStatement |
datasetPreparedStatement |
protected PreparedStatement |
occurrenceByIdPreparedStatement |
protected static String |
SCHEMA |
protected PreparedStatement |
scientificNameFromCommonNamePreparedStatement |
protected PreparedStatement |
scientificNamePreparedStatement |
protected PreparedStatement |
searchCommonNamePreparedStatement |
protected PreparedStatement |
searchScientificNamePreparedStatement |
protected PreparedStatement |
taxonCommonNamePreparedStatement |
protected PreparedStatement |
taxonPreparedStatement |
| Constructor and Description |
|---|
PluginSession(Connection connection) |
PluginSession(DatabaseCredential databaseCredential,
Connection connection) |
protected static final String SCHEMA
protected DatabaseCredential databaseCredential
protected Connection connection
protected PreparedStatement taxonPreparedStatement
protected PreparedStatement taxonCommonNamePreparedStatement
protected PreparedStatement datasetPreparedStatement
protected PreparedStatement commonNameFromScientificNamePreparedStatement
protected PreparedStatement scientificNameFromCommonNamePreparedStatement
protected PreparedStatement searchCommonNamePreparedStatement
protected PreparedStatement searchScientificNamePreparedStatement
protected PreparedStatement scientificNamePreparedStatement
protected PreparedStatement commonNamePreparedStatement
protected PreparedStatement childrenTaxonPreparedStatement
protected PreparedStatement occurrenceByIdPreparedStatement
protected PreparedStatement datasetPerIdPreparedStatement
public PluginSession(Connection connection)
connection - public PluginSession(DatabaseCredential databaseCredential, Connection connection)
credentialToken - connection - public Connection getConnection()
public boolean isValid(DatabaseCredential databaseCredential) throws SQLException
credentialToken - SQLExceptionprotected boolean isValid()
public void expire()
throws SQLException
SQLExceptionpublic void preCacheStatements()
throws SQLException
SQLExceptionpublic PreparedStatement getTaxonPreparedStatement(int id) throws SQLException
SQLExceptionprotected void createTaxonPreparedStatement()
throws SQLException
SQLExceptionpublic PreparedStatement getTaxonCommonNamePreparedStatement(int taxonNameId) throws SQLException
SQLExceptionprotected void createTaxonCommonNamePreparedStatemen()
throws SQLException
SQLExceptionpublic PreparedStatement getDatasetPreparedStatement(int id) throws SQLException
SQLExceptionpublic PreparedStatement getDatasetPerDatasetIdPreparedStatement(int dataSetId) throws SQLException
SQLExceptionpublic PreparedStatement getCommonNameFromScientificNamePreparedStatement(String scientificaName) throws SQLException
SQLExceptionprotected void createCommonNameFromScientificNamePreparedStatement()
throws SQLException
SQLExceptionpublic PreparedStatement getScientificNameFromCommonNamePreparedStatement(String commonName) throws SQLException
SQLExceptionprotected void createScientificNameFromCommonNamePreparedStatement()
throws SQLException
SQLExceptionpublic PreparedStatement getSearchCommonNamePreparedStatement(String searchTerm) throws SQLException
SQLExceptionprotected void createSearchCommonNamePreparedStatement()
throws SQLException
SQLExceptionpublic PreparedStatement getSearchScientificNamePreparedStatement(String searchTerm) throws SQLException
SQLExceptionprotected void createSearchScientificNamePreparedStatement()
throws SQLException
SQLExceptionpublic PreparedStatement getOccurrencesCountPreparedStatement(int taxonId, int datasetId, SearchFilters filters) throws SQLException
SQLExceptionprotected void buildConditions(StringBuilder query, String prefix, List<org.gcube.data.spd.model.Condition> conditions)
protected void buildCondition(StringBuilder query, String prefix, org.gcube.data.spd.model.Condition condition)
protected void addParameters(PreparedStatement preparedStatement, int parameterCounter, List<org.gcube.data.spd.model.Condition> conditions) throws SQLException
SQLExceptionprotected PreparedStatement getOccurrencesPreparedStatement(int taxonId, int datasetId, SearchFilters filters) throws SQLException
SQLExceptionpublic PreparedStatement getScientificNamePreparedStatement(String scientificName) throws SQLException
SQLExceptionprotected void createScientificNamePreparedStatement()
throws SQLException
SQLExceptionpublic PreparedStatement getCommonNamePreparedStatement(String commonName) throws SQLException
SQLExceptionprotected void createCommonNamePreparedStatement()
throws SQLException
SQLExceptionpublic PreparedStatement getChildrenTaxonPreparedStatement(int id) throws SQLException
SQLExceptionprotected void createChildrenTaxonPreparedStatement()
throws SQLException
SQLExceptionprotected PreparedStatement getOccurrenceByIdPreparedStatement(int occurrenceId) throws SQLException
SQLExceptionprotected void createOccurrenceByIdPreparedStatement()
throws SQLException
SQLExceptionprotected void createDatasetPreparedStatement()
throws SQLException
SQLExceptionprotected void createDatasetPerDatasetIdPreparedStatement()
throws SQLException
SQLExceptionCopyright © 2015. All Rights Reserved.