public class ProcedureDAO extends AbstractIdentifierNameDescriptionDAO implements HibernateSqlQueryConstants
TimeCreator.MinMax
Modifier and Type | Field and Description |
---|---|
private static org.slf4j.Logger |
LOGGER |
private static String |
SQL_QUERY_GET_MAX_DATE_FOR_PROCEDURE |
private static String |
SQL_QUERY_GET_MIN_DATE_FOR_PROCEDURE |
private static String |
SQL_QUERY_GET_PROCEDURE_TIME_EXTREMA |
private static String |
SQL_QUERY_GET_PROCEDURES_FOR_ALL_FEATURES_OF_INTEREST |
private static String |
SQL_QUERY_GET_PROCEDURES_FOR_FEATURE_OF_INTEREST |
FEATURE, FEATURES, GEOMETRY, OBSERVABLE_PROPERTIES, OBSERVABLE_PROPERTY, OFFERING, OFFERINGS, PROCEDURE, PROCEDURES, SRID
Constructor and Description |
---|
ProcedureDAO() |
Modifier and Type | Method and Description |
---|---|
private void |
addProcedureRestrictionForObservation(org.hibernate.Criteria criteria,
String procedure)
Add procedure identifier restriction to Hibernate Criteria
|
private void |
addProcedureRestrictionForSeries(org.hibernate.Criteria criteria,
String procedure)
Add procedure identifier restriction to Hibernate Criteria for series
|
private org.hibernate.Criteria |
getDefaultCriteria(org.hibernate.Session session) |
private org.hibernate.Criteria |
getDefaultTProcedureCriteria(org.hibernate.Session session) |
private org.hibernate.Criteria |
getDefaultTProcedureCriteriaIncludeDeleted(org.hibernate.Session session) |
private org.hibernate.criterion.DetachedCriteria |
getDetachedCriteriaProceduresForFeatureOfInterestFromSeries(FeatureOfInterest featureOfInterest,
org.hibernate.Session session)
Get Hibernate Detached Criteria for class Series and featureOfInterest
identifier
|
private org.hibernate.criterion.DetachedCriteria |
getDetachedCriteriaProceduresForObservablePropertyFromObservationConstellation(String observablePropertyIdentifier,
org.hibernate.Session session)
Get Hibernate Detached Criteria for class ObservationConstellation and
observableProperty identifier
|
private org.hibernate.criterion.DetachedCriteria |
getDetachedCriteriaProceduresForObservablePropertyFromSeries(String observablePropertyIdentifier,
org.hibernate.Session session)
Get Hibernate Detached Criteria for class Series and observableProperty
identifier
|
private org.hibernate.criterion.DetachedCriteria |
getDetachedCriteriaProceduresForOfferingFromObservationConstellation(String offeringIdentifier,
org.hibernate.Session session)
Get Hibernate Detached Criteria for class ObservationConstellation and
offering identifier
|
private List<Object[]> |
getFeatureProcedureResult(org.hibernate.Session session) |
Map<String,Collection<String>> |
getFeaturesOfInterestsForAllProcedures(org.hibernate.Session session)
Get FOIs for all procedure identifiers
|
org.joda.time.DateTime |
getMaxDate4Procedure(String procedure,
org.hibernate.Session session)
Get max time from observations for procedure
|
org.joda.time.DateTime |
getMinDate4Procedure(String procedure,
org.hibernate.Session session)
Get min time from observations for procedure
|
protected Set<String> |
getObservationIdentifiers(org.hibernate.Session session,
String procedureIdentifier) |
Procedure |
getOrInsertProcedure(String identifier,
ProcedureDescriptionFormat procedureDecriptionFormat,
Collection<String> parentProcedures,
org.hibernate.Session session)
Insert and get procedure object
|
Procedure |
getProcedureForIdentifier(String identifier,
org.hibernate.Session session)
Get Procedure object for procedure identifier
|
Procedure |
getProcedureForIdentifier(String identifier,
Time time,
org.hibernate.Session session)
Get Procedure object for procedure identifier
|
Procedure |
getProcedureForIdentifierIncludeDeleted(String identifier,
org.hibernate.Session session)
Get Procedure object for procedure identifier inclusive deleted procedure
|
Map<String,String> |
getProcedureFormatMap(org.hibernate.Session session) |
Map<String,Collection<String>> |
getProcedureIdentifiers(org.hibernate.Session session)
Get map keyed by undeleted procedure identifiers with
collections of parent procedures (if supported) as values
|
Collection<String> |
getProcedureIdentifiersForObservableProperty(String observablePropertyIdentifier,
org.hibernate.Session session)
Get procedure identifiers for observable property identifier
|
List<String> |
getProcedureIdentifiersForOffering(String offeringIdentifier,
org.hibernate.Session session)
Get procedure identifiers for offering identifier
|
List<Procedure> |
getProcedureObjects(org.hibernate.Session session)
Get all procedure objects
|
Map<String,Collection<String>> |
getProceduresForAllFeaturesOfInterest(org.hibernate.Session session)
Get procedure identifiers for all FOIs
|
List<String> |
getProceduresForFeatureOfInterest(org.hibernate.Session session,
FeatureOfInterest feature)
Get procedure identifiers for FOI
|
List<Procedure> |
getProceduresForIdentifiers(Collection<String> identifiers,
org.hibernate.Session session)
Get Procedure objects for procedure identifiers
|
TimeExtrema |
getProcedureTimeExtrema(org.hibernate.Session session,
String procedureIdentifier)
Query procedure time extrema for the provided procedure identifier
|
TimeExtrema |
getProcedureTimeExtremaFromNamedQuery(org.hibernate.Session session,
String procedureIdentifier) |
TProcedure |
getTProcedureForIdentifier(String identifier,
org.hibernate.Session session)
Get transactional procedure object for procedure identifier
|
TProcedure |
getTProcedureForIdentifier(String identifier,
Set<String> procedureDescriptionFormats,
org.hibernate.Session session)
Get transactional procedure object for procedure identifier and
procedureDescriptionFormats
|
TProcedure |
getTProcedureForIdentifier(String identifier,
Set<String> possibleProcedureDescriptionFormats,
Time validTime,
org.hibernate.Session session)
Get procedure for identifier, possible procedureDescriptionFormats and
valid time
|
TProcedure |
getTProcedureForIdentifier(String identifier,
String procedureDescriptionFormat,
Time validTime,
org.hibernate.Session session)
Get transactional procedure object for procedure identifier and
procedureDescriptionFormat
|
TProcedure |
getTProcedureForIdentifierIncludeDeleted(String identifier,
org.hibernate.Session session)
Get transactional procedure object for procedure identifier, include deleted
|
boolean |
isProcedureTimeExtremaNamedQuerySupported(org.hibernate.Session session) |
private TimeExtrema |
parseProcedureTimeExtremaResult(Object[] result) |
addDescription, addIdentifier, addIdentifierNameDescription, addName, getAndAddIdentifierNameDescription, getDescription, getIdentifier, getName, insertNameAndDescription, insertNames
addMinMaxProjection, createTimePeriod
private static final org.slf4j.Logger LOGGER
private static final String SQL_QUERY_GET_PROCEDURES_FOR_ALL_FEATURES_OF_INTEREST
private static final String SQL_QUERY_GET_PROCEDURES_FOR_FEATURE_OF_INTEREST
private static final String SQL_QUERY_GET_PROCEDURE_TIME_EXTREMA
private static final String SQL_QUERY_GET_MIN_DATE_FOR_PROCEDURE
private static final String SQL_QUERY_GET_MAX_DATE_FOR_PROCEDURE
public List<Procedure> getProcedureObjects(org.hibernate.Session session)
session
- Hibernate sessionpublic Map<String,Collection<String>> getProcedureIdentifiers(org.hibernate.Session session)
session
- public Procedure getProcedureForIdentifier(String identifier, org.hibernate.Session session)
identifier
- Procedure identifiersession
- Hibernate sessionpublic Procedure getProcedureForIdentifierIncludeDeleted(String identifier, org.hibernate.Session session)
identifier
- Procedure identifiersession
- Hibernate sessionpublic Procedure getProcedureForIdentifier(String identifier, Time time, org.hibernate.Session session)
identifier
- Procedure identifiersession
- Hibernate sessionpublic List<Procedure> getProceduresForIdentifiers(Collection<String> identifiers, org.hibernate.Session session)
identifiers
- Procedure identifierssession
- Hibernate sessionpublic Map<String,Collection<String>> getProceduresForAllFeaturesOfInterest(org.hibernate.Session session)
session
- Hibernate sessionorg.hibernate.HibernateException
CodedException
public Map<String,Collection<String>> getFeaturesOfInterestsForAllProcedures(org.hibernate.Session session)
session
- Hibernate sessionCodedException
private List<Object[]> getFeatureProcedureResult(org.hibernate.Session session)
public List<String> getProceduresForFeatureOfInterest(org.hibernate.Session session, FeatureOfInterest feature) throws OwsExceptionReport
session
- Hibernate sessionfeature
- FOI objectCodedException
OwsExceptionReport
public List<String> getProcedureIdentifiersForOffering(String offeringIdentifier, org.hibernate.Session session) throws OwsExceptionReport
offeringIdentifier
- Offering identifiersession
- Hibernate sessionCodedException
- If an error occursOwsExceptionReport
private org.hibernate.Criteria getDefaultCriteria(org.hibernate.Session session)
private org.hibernate.Criteria getDefaultTProcedureCriteria(org.hibernate.Session session)
private org.hibernate.Criteria getDefaultTProcedureCriteriaIncludeDeleted(org.hibernate.Session session)
public Collection<String> getProcedureIdentifiersForObservableProperty(String observablePropertyIdentifier, org.hibernate.Session session) throws CodedException
observablePropertyIdentifier
- Observable property identifiersession
- Hibernate sessionCodedException
public TProcedure getTProcedureForIdentifier(String identifier, org.hibernate.Session session)
identifier
- Procedure identifiersession
- Hibernate sessionpublic TProcedure getTProcedureForIdentifierIncludeDeleted(String identifier, org.hibernate.Session session)
identifier
- Procedure identifiersession
- Hibernate sessionpublic TProcedure getTProcedureForIdentifier(String identifier, String procedureDescriptionFormat, Time validTime, org.hibernate.Session session) throws UnsupportedTimeException, UnsupportedValueReferenceException, UnsupportedOperatorException
identifier
- Procedure identifierprocedureDescriptionFormat
- ProcedureDescriptionFormat identifiersession
- Hibernate sessionUnsupportedOperatorException
UnsupportedValueReferenceException
UnsupportedTimeException
public TProcedure getTProcedureForIdentifier(String identifier, Set<String> procedureDescriptionFormats, org.hibernate.Session session)
identifier
- Procedure identifierprocedureDescriptionFormats
- ProcedureDescriptionFormat identifierssession
- Hibernate sessionpublic TProcedure getTProcedureForIdentifier(String identifier, Set<String> possibleProcedureDescriptionFormats, Time validTime, org.hibernate.Session session) throws UnsupportedTimeException, UnsupportedValueReferenceException, UnsupportedOperatorException
identifier
- Identifier of the procedurepossibleProcedureDescriptionFormats
- Possible procedureDescriptionFormatsvalidTime
- Valid time of the proceduresession
- Hibernate SessionUnsupportedTimeException
- If the time is not supportedUnsupportedValueReferenceException
- If the valueReference is not supportedUnsupportedOperatorException
- If the temporal operator is not supportedpublic boolean isProcedureTimeExtremaNamedQuerySupported(org.hibernate.Session session)
public TimeExtrema getProcedureTimeExtremaFromNamedQuery(org.hibernate.Session session, String procedureIdentifier)
private TimeExtrema parseProcedureTimeExtremaResult(Object[] result)
public TimeExtrema getProcedureTimeExtrema(org.hibernate.Session session, String procedureIdentifier) throws OwsExceptionReport
session
- procedureIdentifier
- CodedException
OwsExceptionReport
public org.joda.time.DateTime getMinDate4Procedure(String procedure, org.hibernate.Session session) throws OwsExceptionReport
procedure
- Procedure identifiersession
- Hibernate sessionCodedException
OwsExceptionReport
public org.joda.time.DateTime getMaxDate4Procedure(String procedure, org.hibernate.Session session) throws OwsExceptionReport
procedure
- Procedure identifiersession
- Hibernate sessionCodedException
OwsExceptionReport
public Procedure getOrInsertProcedure(String identifier, ProcedureDescriptionFormat procedureDecriptionFormat, Collection<String> parentProcedures, org.hibernate.Session session)
identifier
- Procedure identifierprocedureDecriptionFormat
- Procedure description format objectparentProcedures
- Parent procedure identifierssession
- Hibernate sessionprivate org.hibernate.criterion.DetachedCriteria getDetachedCriteriaProceduresForFeatureOfInterestFromSeries(FeatureOfInterest featureOfInterest, org.hibernate.Session session) throws CodedException
featureOfInterest
- FeatureOfInterest identifier parametersession
- Hibernate sessionCodedException
private org.hibernate.criterion.DetachedCriteria getDetachedCriteriaProceduresForObservablePropertyFromObservationConstellation(String observablePropertyIdentifier, org.hibernate.Session session)
observablePropertyIdentifier
- ObservableProperty identifier parametersession
- Hibernate sessionprivate org.hibernate.criterion.DetachedCriteria getDetachedCriteriaProceduresForObservablePropertyFromSeries(String observablePropertyIdentifier, org.hibernate.Session session) throws CodedException
observablePropertyIdentifier
- ObservableProperty identifier parametersession
- Hibernate sessionCodedException
private org.hibernate.criterion.DetachedCriteria getDetachedCriteriaProceduresForOfferingFromObservationConstellation(String offeringIdentifier, org.hibernate.Session session)
offeringIdentifier
- Offering identifier parametersession
- Hibernate sessionprivate void addProcedureRestrictionForSeries(org.hibernate.Criteria criteria, String procedure)
criteria
- Hibernate Criteria for series to add restrictionprocedure
- Procedure identifierprivate void addProcedureRestrictionForObservation(org.hibernate.Criteria criteria, String procedure)
criteria
- Hibernate Criteria to add restrictionprocedure
- Procedure identifierprotected Set<String> getObservationIdentifiers(org.hibernate.Session session, String procedureIdentifier)
Copyright © 2012-2015 52north.org. All Rights Reserved.