public class ProcedureDAO extends TimeCreator implements HibernateSqlQueryConstants
Modifier and Type | Class and Description |
---|---|
class |
ProcedureDAO.ProcedureTimeExtrema
Hold min and max obs time for procedure
|
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.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
|
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
|
ProcedureDAO.ProcedureTimeExtrema |
getProcedureTimeExtrema(org.hibernate.Session session,
String procedureIdentifier)
Query procedure time extrema for the provided procedure identifier
|
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
|
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 sessionCodedException
public List<String> getProceduresForFeatureOfInterest(org.hibernate.Session session, FeatureOfInterest feature) throws CodedException
session
- Hibernate sessionfeature
- FOI objectCodedException
public List<String> getProcedureIdentifiersForOffering(String offeringIdentifier, org.hibernate.Session session) throws CodedException
offeringIdentifier
- Offering identifiersession
- Hibernate sessionCodedException
- If an error occursprivate org.hibernate.Criteria getDefaultCriteria(org.hibernate.Session session)
public Collection<String> getProcedureIdentifiersForObservableProperty(String observablePropertyIdentifier, org.hibernate.Session session)
observablePropertyIdentifier
- Observable property identifiersession
- Hibernate sessionpublic TProcedure getTProcedureForIdentifier(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 ProcedureDAO.ProcedureTimeExtrema getProcedureTimeExtrema(org.hibernate.Session session, String procedureIdentifier) throws CodedException
session
- procedureIdentifier
- CodedException
public org.joda.time.DateTime getMinDate4Procedure(String procedure, org.hibernate.Session session) throws CodedException
procedure
- Procedure identifiersession
- Hibernate sessionCodedException
public org.joda.time.DateTime getMaxDate4Procedure(String procedure, org.hibernate.Session session) throws CodedException
procedure
- Procedure identifiersession
- Hibernate sessionCodedException
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)
featureOfInterest
- FeatureOfInterest identifier parametersession
- Hibernate sessionprivate 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)
observablePropertyIdentifier
- ObservableProperty identifier parametersession
- Hibernate sessionprivate 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-2014 52north.org. All Rights Reserved.