List of usage examples for org.hibernate.criterion Restrictions conjunction
public static Conjunction conjunction()
From source file:com.eucalyptus.entities.Transactions.java
License:Open Source License
public static <T> List<T> each(T search, Callback<T> c) throws TransactionException { return each(search, Restrictions.conjunction(), Collections.<String, String>emptyMap(), c); }
From source file:com.eucalyptus.reporting.art.generator.AbstractArtGenerator.java
License:Open Source License
protected Criterion between(final Long beginInclusive, final Long endExclusive) { return Restrictions.conjunction().add(Restrictions.ge(TIMESTAMP_MS, beginInclusive)) .add(before(endExclusive));/*from w w w. ja va 2 s.com*/ }
From source file:com.eucalyptus.reporting.art.generator.ElasticIpArtGenerator.java
License:Open Source License
protected void foreachElasticIpCreateEvent(final Predicate<? super ReportingElasticIpCreateEvent> callback) { foreach(ReportingElasticIpCreateEvent.class, Restrictions.conjunction(), true, callback); }
From source file:com.eucalyptus.reporting.art.generator.ElasticIpArtGenerator.java
License:Open Source License
protected void foreachElasticIpDeleteEvent(final Predicate<? super ReportingElasticIpDeleteEvent> callback) { foreach(ReportingElasticIpDeleteEvent.class, Restrictions.conjunction(), true, callback); }
From source file:com.eucalyptus.reporting.art.generator.ElasticIpArtGenerator.java
License:Open Source License
protected void foreachElasticIpAttachEvent(final Predicate<? super ReportingElasticIpAttachEvent> callback) { foreach(ReportingElasticIpAttachEvent.class, Restrictions.conjunction(), true, callback); }
From source file:com.eucalyptus.reporting.art.generator.ElasticIpArtGenerator.java
License:Open Source License
protected void foreachElasticIpDetachEvent(final Predicate<? super ReportingElasticIpDetachEvent> callback) { foreach(ReportingElasticIpDetachEvent.class, Restrictions.conjunction(), true, callback); }
From source file:com.eucalyptus.reporting.art.generator.ElasticIpArtGenerator.java
License:Open Source License
protected void foreachInstanceCreateEvent(final Predicate<? super ReportingInstanceCreateEvent> callback) { foreach(ReportingInstanceCreateEvent.class, Restrictions.conjunction(), true, callback); }
From source file:com.eucalyptus.reporting.export.Export.java
License:Open Source License
public static ReportingExport export(final Date startDate, final Date endDate, final boolean includeDependencies) { final ReportingExport export = new ReportingExport(); final Conjunction criterion = Restrictions.conjunction(); if (startDate != null) { criterion.add(Restrictions.ge(CREATION_TIMESTAMP, startDate)); }/* w w w.j av a2 s . c om*/ if (endDate != null) { criterion.add(Restrictions.lt(CREATION_TIMESTAMP, endDate)); } final List<ReportingEventSupport> actions = Lists.newArrayList(); export.addUsage( Iterables.filter( Iterables.transform( iterableExporter(criterion, getUsageClasses(), Collections.<ReportingEventSupport>emptyList(), includeDependencies), ExportUtils.toExportUsage(includeDependencies ? actions : null)), Predicates.notNull())); export.addActions( Iterables .transform( Iterables.concat(actions, iterableExporter(criterion, getEventClasses(), actions, includeDependencies)), Functions.compose(userAccountDecorator(), ExportUtils.toExportAction()))); return export; }
From source file:com.eucalyptus.simpleworkflow.persist.PersistenceDomains.java
License:Open Source License
public <T> List<T> listDeprecatedExpired(final long time, final Function<? super Domain, T> transform) throws SwfMetadataException { return listByExample(Domain.exampleWithStatus(Domain.Status.Deprecated), Predicates.alwaysTrue(), Restrictions.conjunction().add(Restrictions.isEmpty("workflowTypes")) .add(Restrictions.lt("lastUpdateTimestamp", new Date(time - getDeprecatedDomainRetentionDurationMillis()))), Collections.<String, String>emptyMap(), transform); }
From source file:com.eucalyptus.simpleworkflow.persist.PersistenceWorkflowTypes.java
License:Open Source License
public <T> List<T> listDeprecatedExpired(final long time, final Function<? super WorkflowType, T> transform) throws SwfMetadataException { return listByExample(WorkflowType.exampleWithOwner(null), Predicates.alwaysTrue(), Restrictions.conjunction().add(Restrictions.isEmpty("executions")) .add(Restrictions.lt("deprecationTimestamp", new Date(time - getDeprecatedWorkflowTypeRetentionDurationMillis()))), Collections.<String, String>emptyMap(), transform); }