コード例 #1
0
 /**
  * ExpressionOperator for the MDSYS.SDO_WITHIN_DISTANCE Spatial Operator on the Oracle Database
  * Use of this operator requires the Java spatial classes
  *
  * @return
  */
 public static ExpressionOperator withinDistance() {
   ExpressionOperator operator =
       ExpressionOperator.simpleThreeArgumentFunction(
           SDO_WITHIN_DISTANCE, "MDSYS.SDO_WITHIN_DISTANCE");
   operator.bePrefix();
   return operator;
 }
コード例 #2
0
 /** INTERNAL: Build locate operator i.e. LOCATE("ob", t0.F_NAME) */
 public static ExpressionOperator createLocateOperator() {
   ExpressionOperator expOperator =
       ExpressionOperator.simpleTwoArgumentFunction(ExpressionOperator.Locate, "INSTR");
   int[] argumentIndices = new int[2];
   argumentIndices[0] = 0;
   argumentIndices[1] = 1;
   expOperator.setArgumentIndices(argumentIndices);
   expOperator.setIsBindingSupported(false);
   return expOperator;
 }
コード例 #3
0
 /** Create the log operator for this platform */
 private static final ExpressionOperator createLogOperator() {
   ExpressionOperator result = new ExpressionOperator();
   result.setSelector(ExpressionOperator.Log);
   Vector v = NonSynchronizedVector.newInstance(2);
   v.addElement("LOG(10,");
   v.addElement(")");
   result.printsAs(v);
   result.bePrefix();
   result.setNodeClass(FunctionExpression.class);
   return result;
 }
コード例 #4
0
 private static final ExpressionOperator createNullifOperator() {
   ExpressionOperator exOperator = new ExpressionOperator();
   exOperator.setType(ExpressionOperator.FunctionOperator);
   exOperator.setSelector(ExpressionOperator.NullIf);
   Vector v = org.eclipse.persistence.internal.helper.NonSynchronizedVector.newInstance(4);
   v.addElement(" (CASE WHEN ");
   v.addElement(" = ");
   v.addElement(" THEN NULL ELSE ");
   v.addElement(" END) ");
   exOperator.printsAs(v);
   exOperator.bePrefix();
   int[] indices = {0, 1, 0};
   exOperator.setArgumentIndices(indices);
   exOperator.setNodeClass(ClassConstants.FunctionExpression_Class);
   return exOperator;
 }
コード例 #5
0
 /** INTERNAL: Allow the use of XMLType operators on this platform. */
 protected void initializePlatformOperators() {
   super.initializePlatformOperators();
   addOperator(ExpressionOperator.extract());
   addOperator(ExpressionOperator.extractValue());
   addOperator(ExpressionOperator.existsNode());
   addOperator(ExpressionOperator.isFragment());
   addOperator(ExpressionOperator.getStringVal());
   addOperator(ExpressionOperator.getNumberVal());
   addOperator(SpatialExpressionOperators.withinDistance());
   addOperator(SpatialExpressionOperators.relate());
   addOperator(SpatialExpressionOperators.filter());
   addOperator(SpatialExpressionOperators.nearestNeighbor());
 }
コード例 #6
0
 protected void initializePlatformOperators() {
   super.initializePlatformOperators();
   addOperator(ExpressionOperator.simpleMath(ExpressionOperator.Concat, "||"));
 }
コード例 #7
0
 private void addNonBindingOperator(ExpressionOperator operator) {
   operator.setIsBindingSupported(false);
   addOperator(operator);
 }
コード例 #8
0
 private static final ExpressionOperator createNullValueOperator() {
   return ExpressionOperator.simpleTwoArgumentFunction(ExpressionOperator.Nvl, "IFNULL");
 }
コード例 #9
0
 /**
  * Creates the expression operator representing the JPQL function variance
  *
  * @return the expression operator representing the JPQL function variance
  */
 private static final ExpressionOperator createVarianceOperator() {
   return ExpressionOperator.simpleAggregate(ExpressionOperator.Variance, "VAR", "variance");
 }
コード例 #10
0
 /**
  * Creates the expression operator representing the JPQL function current_timestamp as defined by
  * 4.6.17.2.3 of the JPA 2.0 specification
  *
  * @return the expression operator representing the JPQL function current_timestamp as defined by
  *     4.6.17.2.3 of the JPA 2.0 specification
  */
 private static final ExpressionOperator createCurrentTimeExpressionOperator() {
   return ExpressionOperator.simpleLogicalNoParens(ExpressionOperator.CurrentTime, "CURRENT_TIME");
 }
コード例 #11
0
 /**
  * Creates the expression operator representing the JPQL function current_timestamp as defined by
  * 4.6.17.2.3 of the JPA 2.0 specification
  *
  * @return the expression operator representing the JPQL function current_timestamp as defined by
  *     4.6.17.2.3 of the JPA 2.0 specification
  */
 private static final ExpressionOperator createTodayExpressionOperator() {
   return ExpressionOperator.simpleLogicalNoParens(ExpressionOperator.Today, "CURRENT_TIMESTAMP");
 }
コード例 #12
0
 private static final ExpressionOperator createConcatExpressionOperator() {
   return ExpressionOperator.simpleLogicalNoParens(ExpressionOperator.Concat, "||");
 }
コード例 #13
0
 /**
  * ExpressionOperator for the MDSYS.SDO_NN Spatial Operator on the Oracle Database Use of this
  * operator requires the Java spatial classes
  *
  * @return
  */
 public static ExpressionOperator nearestNeighbor() {
   ExpressionOperator operator =
       ExpressionOperator.simpleThreeArgumentFunction(SDO_NN, "MDSYS.SDO_NN");
   operator.bePrefix();
   return operator;
 }
コード例 #14
0
 /**
  * ExpressionOperator for the MDSYS.SDO_FILTER Spatial Operator on the Oracle Database Use of this
  * operator requires the Java spatial classes
  *
  * @return
  */
 public static ExpressionOperator filter() {
   ExpressionOperator operator =
       ExpressionOperator.simpleThreeArgumentFunction(SDO_FILTER, "MDSYS.SDO_FILTER");
   operator.bePrefix();
   return operator;
 }
コード例 #15
0
 /**
  * ExpressionOperator for the MDSYS.MDSYS.SDO_RELATE Spatial Operator on the Oracle Database Use
  * of this operator requires the Java spatial classes
  *
  * @return
  */
 public static ExpressionOperator relate() {
   ExpressionOperator operator =
       ExpressionOperator.simpleThreeArgumentFunction(SDO_RELATE, "MDSYS.SDO_RELATE");
   operator.bePrefix();
   return operator;
 }