1 23 24 30 31 package com.sun.jdo.spi.persistence.support.sqlstore.sql.constraint; 32 33 import com.sun.jdo.spi.persistence.support.sqlstore.ActionDesc; 34 35 37 public class ConstraintOperation extends ConstraintNode { 38 public static final int PROP_ORDERBY = 1; 39 40 public static final int PROP_ORDERBY_DESC = 2; 41 42 public int operation; 43 44 public ConstraintOperation() { 45 super(); 46 } 47 48 public ConstraintOperation(int operation) { 49 super(); 50 51 this.operation = operation; 52 } 53 54 55 public int hasProperty(int propertyKey) { 56 if (propertyKey == PROP_ORDERBY) { 59 if (operation == ActionDesc.OP_ORDERBY 60 || operation == ActionDesc.OP_ORDERBY_DESC) { 61 return ConstraintNode.PROP_TRUE; 62 } else { 63 return ConstraintNode.PROP_FALSE; 64 } 65 } 66 return ConstraintNode.PROP_UNKNOWN; 67 } 68 } 69 | Popular Tags |