Tabnine Logo
AsOfClause
Code IndexAdd Tabnine to your IDE (free)

How to use
AsOfClause
in
org.eclipse.persistence.history

Best Java code snippets using org.eclipse.persistence.history.AsOfClause (Showing top 20 results out of 315)

origin: com.haulmont.thirdparty/eclipselink

/**
 * ADVANCED:
 * Answers if all objects are to be read as of a past time.  Only true if
 * this is a special historical session.
 * @see #getAsOfClause
 */
public boolean hasAsOfClause() {
  return ((asOfClause != null) && (asOfClause.getValue() != null));
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * INTERNAL:
 * Prints the as of clause for an expression inside of the FROM clause.
 */
public void printSQL(ExpressionSQLPrinter printer) {
  ((AsOfClause)super.getValue()).printSQL(printer);
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

  public String printString() {
    return "Universal" + getAsOfClause().toString();
  }
}
origin: com.haulmont.thirdparty/eclipselink

writer.write(" ");
if (alias.isDecorated()) {
  ((DecoratedDatabaseTable)alias).getAsOfClause().printSQL(printer);
  writer.write(" ");
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

public void setSelectionCriteria(Expression expression) {
  super.setSelectionCriteria(expression);
  if ((expression != null) && (defaultBuilder != null) && (defaultBuilder.getQueryClass() == null)){
    // For flashback: Must make sure expression and defaultBuilder always in sync.
    ExpressionBuilder newBuilder = expression.getBuilder();
    if (newBuilder != defaultBuilder) {
      if (hasAsOfClause() && getAsOfClause().isUniversal()) {
        newBuilder.asOf(defaultBuilder.getAsOfClause());
      }
      defaultBuilder = newBuilder;
    }
  }
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * INTERNAL:
 * Return if the expression is equal to the other.
 * This is used to allow dynamic expression's SQL to be cached.
 */
@Override
public boolean equals(Object object) {
  if (this == object) {
    return true;
  }
  if (!super.equals(object)) {
    return false;
  }
  DataExpression expression = (DataExpression) object;
  return ((this.baseExpression == expression.getBaseExpression()) || ((this.baseExpression != null) && this.baseExpression.equals(expression.getBaseExpression())))
    && ((getAsOfClause() == expression.getAsOfClause()) || ((getAsOfClause() != null) && getAsOfClause().equals(expression.getAsOfClause())));
}
 
origin: com.haulmont.thirdparty/eclipselink

  DatabaseQuery applyToDatabaseQuery(Object valueToApply, DatabaseQuery query, ClassLoader loader, AbstractSession activeSession) {
    if (query.isObjectLevelReadQuery()) {
      ((ObjectLevelReadQuery) query).setAsOfClause(new AsOfClause(Helper.timestampFromString((String)valueToApply)));
    } else {
      throw new IllegalArgumentException(ExceptionLocalization.buildMessage("ejb30-wrong-type-for-query-hint",new Object[]{getQueryId(query), name, getPrintValue(valueToApply)}));
    }
    
    return query;
  }
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

writer.write(" ");
if (alias.isDecorated()) {
  ((DecoratedDatabaseTable)alias).getAsOfClause().printSQL(printer);
  writer.write(" ");
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * PUBLIC:
 * Set the Expression/where clause of the query.
 * The expression should be defined using the query's ExpressionBuilder.
 */
@Override
public void setSelectionCriteria(Expression expression) {
  super.setSelectionCriteria(expression);
  if ((expression != null) && (this.defaultBuilder != null) && (this.defaultBuilder.getQueryClass() == null)){
    // For flashback: Must make sure expression and defaultBuilder always in sync.
    ExpressionBuilder newBuilder = expression.getBuilder();
    if (newBuilder != this.defaultBuilder) {
      if (hasAsOfClause() && getAsOfClause().isUniversal()) {
        newBuilder.asOf(this.defaultBuilder.getAsOfClause());
      }
      this.defaultBuilder = newBuilder;
    }
  }
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * INTERNAL:
 * Return if the expression is equal to the other.
 * This is used to allow dynamic expression's SQL to be cached.
 */
@Override
public boolean equals(Object object) {
  if (this == object) {
    return true;
  }
  if (!super.equals(object)) {
    return false;
  }
  DataExpression expression = (DataExpression) object;
  return ((this.baseExpression == expression.getBaseExpression()) || ((this.baseExpression != null) && this.baseExpression.equals(expression.getBaseExpression())))
    && ((getAsOfClause() == expression.getAsOfClause()) || ((getAsOfClause() != null) && getAsOfClause().equals(expression.getAsOfClause())));
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * {@inheritDoc}
 */
@Override
public void visit(AsOfClause expression) {
  Expression queryExpression = queryContext.buildExpression(expression);
  org.eclipse.persistence.history.AsOfClause asOfClause;
  if (expression.hasScn()) {
    asOfClause = new AsOfSCNClause(queryExpression);
  }
  else {
    asOfClause = new org.eclipse.persistence.history.AsOfClause(queryExpression);
  }
  query.setAsOfClause(asOfClause);
  query.setShouldMaintainCache(false);
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * INTERNAL:
 * Gets the actual as of clause represented by <code>this</code>.
 */
public AsOfClause getAsOfClause() {
  return (AsOfClause)super.getValue();
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * INTERNAL:
 * Prints the as of clause for an expression inside of the FROM clause.
 */
public void printSQL(ExpressionSQLPrinter printer) {
  ((AsOfClause)super.getValue()).printSQL(printer);
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

((DecoratedDatabaseTable)alias).getAsOfClause().printSQL(printer);
writer.write(" ");
((DecoratedDatabaseTable)alias).getAsOfClause().printSQL(printer);
origin: com.haulmont.thirdparty/eclipselink

/**
 * PUBLIC:
 * Set the Expression/where clause of the query.
 * The expression should be defined using the query's ExpressionBuilder.
 */
@Override
public void setSelectionCriteria(Expression expression) {
  super.setSelectionCriteria(expression);
  if ((expression != null) && (this.defaultBuilder != null) && (this.defaultBuilder.getQueryClass() == null)){
    // For flashback: Must make sure expression and defaultBuilder always in sync.
    ExpressionBuilder newBuilder = expression.getBuilder();
    if (newBuilder != this.defaultBuilder) {
      if (hasAsOfClause() && getAsOfClause().isUniversal()) {
        newBuilder.asOf(this.defaultBuilder.getAsOfClause());
      }
      this.defaultBuilder = newBuilder;
    }
  }
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

  public String printString() {
    return "Universal" + getAsOfClause().toString();
  }
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * INTERNAL:
 * Return if the expression is equal to the other.
 * This is used to allow dynamic expression's SQL to be cached.
 */
public boolean equals(Object object) {
  if (this == object) {
    return true;
  }
  if (!super.equals(object)) {
    return false;
  }
  DataExpression expression = (DataExpression) object;
  return ((getBaseExpression() == expression.getBaseExpression()) || ((getBaseExpression() != null) && getBaseExpression().equals(expression.getBaseExpression())))
    && ((getAsOfClause() == expression.getAsOfClause()) || ((getAsOfClause() != null) && getAsOfClause().equals(expression.getAsOfClause())));
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * {@inheritDoc}
 */
@Override
public void visit(AsOfClause expression) {
  Expression queryExpression = queryContext.buildExpression(expression);
  org.eclipse.persistence.history.AsOfClause asOfClause;
  if (expression.hasScn()) {
    asOfClause = new AsOfSCNClause(queryExpression);
  }
  else {
    asOfClause = new org.eclipse.persistence.history.AsOfClause(queryExpression);
  }
  query.setAsOfClause(asOfClause);
  query.setShouldMaintainCache(false);
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * ADVANCED:
 * Answers if all objects are to be read as of a past time.  Only true if
 * this is a special historical session.
 * @see #getAsOfClause
 */
public boolean hasAsOfClause() {
  return ((asOfClause != null) && (asOfClause.getValue() != null));
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * INTERNAL:
 * Prints the as of clause for an expression inside of the FROM clause.
 */
public void printSQL(ExpressionSQLPrinter printer) {
  ((AsOfClause)super.getValue()).printSQL(printer);
}
org.eclipse.persistence.historyAsOfClause

Javadoc

Purpose:Wraps an immutable value for a past time. A session, query, or expression can be as of a past time.

For Oracle 9R2 Flasback corresponds to the sub clause which appears between the table and alias name in the FROM clause: SELECT ... FROM EMPLOYEE AS OF TIMESTAMP (value) t0, ...

For generic historical schema support, a special criteria can be added to the where clause for each table in a select: ((t0.ROW_START value)))

Responsibilities:

  • By default AsOfClause is a timestamp. To specify a system change number use AsOfSCNClause.
  • For Oracle 9R2 Flashback prints the correct AS OF clause before the alias name in the FROM clause.
  • Read-only: the wrapped value can not change.

Most used methods

  • equals
    INTERNAL: Return if the as of is equal to the other. Equality of asOf clauses is complex (with subcl
  • getValue
    PUBLIC: The past time represented by the receiver. Either a timestamp, a system change number, or an
  • isUniversal
    PUBLIC: Answers if this is a UniversalAsOfClause, one to be applied to the entire selection criteria
  • printSQL
    INTERNAL: Prints the as of clause for an expression inside of the FROM clause.
  • toString
  • <init>

Popular in Java

  • Running tasks concurrently on multiple threads
  • onRequestPermissionsResult (Fragment)
  • notifyDataSetChanged (ArrayAdapter)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • Table (org.hibernate.mapping)
    A relational table
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now