org.plasma.query.model
Class Property

java.lang.Object
  extended by org.plasma.query.model.AbstractProperty
      extended by org.plasma.query.model.Property
All Implemented Interfaces:
DataProperty, Property, Term

public class Property
extends AbstractProperty
implements DataProperty


Field Summary
protected  Projection as
           
protected  SortDirectionValues direction
           
protected  java.lang.Boolean distinct
           
protected  FunctionValues function
           
protected  java.lang.String name
           
protected  java.lang.String physicalName
          Stores the physical name associated with this property.
protected  byte[] physicalNameBytes
          Stores the physical name bytes associated with this property.
protected  Query query
           
protected  java.lang.Boolean values
           
 
Fields inherited from class org.plasma.query.model.AbstractProperty
path
 
Constructor Summary
Property()
           
Property(java.lang.String name)
           
Property(java.lang.String name, FunctionValues function)
           
Property(java.lang.String name, Path path)
           
Property(java.lang.String name, Path path, Query query)
           
Property(java.lang.String name, Path path, SortDirectionValues direction)
           
Property(java.lang.String name, Query query)
           
Property(java.lang.String name, SortDirectionValues direction)
           
 
Method Summary
 void accept(QueryVisitor visitor)
           
 DataProperty asc()
          Constructs a ascending ordering within this data property and returns the data property for use in subsequent operations
 java.lang.String asPathString()
          Returns the path qualified name for this property, i.e.
 DataProperty avg()
          Constructs a average aggregate within this data property and returns the data property for use in subsequent operations
 Expression between(java.lang.Object min, java.lang.Object max)
          Returns a 6 term expression, where this property is greater than or equal to the given 'min' literal, and is less than or equal tothe given 'max' literal.
 DataProperty desc()
          Constructs a descending ordering within this data property and returns the data property for use in subsequent operations
 Expression eq(java.lang.Object value)
          Returns a boolean expression where this property is equal to to the given literal.
 Expression exists(Query subquery)
           
static Property forName(java.lang.String name)
          Factory method returning a property for the given name.
static Property forName(java.lang.String name, Path path)
          Factory method returning a property for the given name and path.
 Expression ge(java.lang.Object value)
          Returns a boolean expression where this property is greater than or equal to the given literal.
 Projection getAs()
           
 SortDirectionValues getDirection()
           
 FunctionValues getFunction()
           
 java.lang.String getName()
          returns the name of this property
 java.lang.String getPhysicalName()
           
 byte[] getPhysicalNameBytes()
           
 Query getQuery()
           
 Expression gt(java.lang.Object value)
          Returns a boolean expression where this property is greater than the given literal.
 Expression in(Query subquery)
          Returns a subquery expression, where this property is found within the given subquery results collection.
 boolean isDistinct()
          Gets the value of the distinct property.
 Expression isNotNull()
          Returns a boolean expression where this property is not equal to null.
 Expression isNull()
          Returns a boolean expression where this property is equal to null.
 boolean isValues()
           
 Expression le(java.lang.Object value)
          Returns a boolean expression where this property is less than or equal to the given literal.
 Expression like(java.lang.String value)
          Returns a wildcard expression where this property is like the given literal, and the literal may contain any number of wildcards, the wildcard character being '*'
 Expression lt(java.lang.Object value)
          Returns a boolean expression where this property is less than the given literal.
 DataProperty max()
          Constructs a maximum aggregate within this data property and returns the data property for use in subsequent operations
 DataProperty min()
          Constructs a minimum aggregate within this data property and returns the data property for use in subsequent operations
 Expression ne(java.lang.Object value)
          Returns a boolean expression where this property is not equal to to the given literal.
 Expression notIn(Query subquery)
          Returns a subquery expression, where this property is not found within the given subquery results collection.
 void setAs(Projection value)
           
 void setDirection(SortDirectionValues value)
           
 void setDistinct(java.lang.Boolean value)
           
 void setFunction(FunctionValues value)
           
 void setName(java.lang.String value)
           
 void setPhysicalName(java.lang.String value)
           
 void setPhysicalNameBytes(byte[] value)
           
 void setQuery(Query value)
           
 void setValues(java.lang.Boolean value)
           
 DataProperty sum()
          Constructs a summation aggregate within this data property and returns the data property for use in subsequent operations
static WildcardProperty wildcard()
           
static WildcardProperty wildcard(Path path)
           
 
Methods inherited from class org.plasma.query.model.AbstractProperty
getPath, setPath
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

query

protected Query query

as

protected Projection as

name

protected java.lang.String name

values

protected java.lang.Boolean values

distinct

protected java.lang.Boolean distinct

direction

protected SortDirectionValues direction

function

protected FunctionValues function

physicalName

protected transient java.lang.String physicalName
Stores the physical name associated with this property. Can be used by service providers for query post processing. This field is not processed during XML or other serialization operations.


physicalNameBytes

protected transient byte[] physicalNameBytes
Stores the physical name bytes associated with this property. Can be used by service providers for query post processing. This field is not processed during XML or other serialization operations.

Constructor Detail

Property

public Property()

Property

public Property(java.lang.String name)

Property

public Property(java.lang.String name,
                Path path)

Property

public Property(java.lang.String name,
                SortDirectionValues direction)

Property

public Property(java.lang.String name,
                Path path,
                SortDirectionValues direction)

Property

public Property(java.lang.String name,
                FunctionValues function)

Property

public Property(java.lang.String name,
                Query query)

Property

public Property(java.lang.String name,
                Path path,
                Query query)
Method Detail

forName

public static Property forName(java.lang.String name)
Factory method returning a property for the given name.


forName

public static Property forName(java.lang.String name,
                               Path path)
Factory method returning a property for the given name and path.


wildcard

public static WildcardProperty wildcard()

wildcard

public static WildcardProperty wildcard(Path path)

eq

public Expression eq(java.lang.Object value)
Description copied from interface: DataProperty
Returns a boolean expression where this property is equal to to the given literal.

Specified by:
eq in interface DataProperty
Parameters:
value - the literal
Returns:
the boolean expression

ne

public Expression ne(java.lang.Object value)
Description copied from interface: DataProperty
Returns a boolean expression where this property is not equal to to the given literal.

Specified by:
ne in interface DataProperty
Parameters:
value - the literal
Returns:
the boolean expression

gt

public Expression gt(java.lang.Object value)
Description copied from interface: DataProperty
Returns a boolean expression where this property is greater than the given literal.

Specified by:
gt in interface DataProperty
Parameters:
value - the literal
Returns:
the boolean expression

ge

public Expression ge(java.lang.Object value)
Description copied from interface: DataProperty
Returns a boolean expression where this property is greater than or equal to the given literal.

Specified by:
ge in interface DataProperty
Parameters:
value - the literal
Returns:
the boolean expression

lt

public Expression lt(java.lang.Object value)
Description copied from interface: DataProperty
Returns a boolean expression where this property is less than the given literal.

Specified by:
lt in interface DataProperty
Parameters:
value - the literal
Returns:
the boolean expression

le

public Expression le(java.lang.Object value)
Description copied from interface: DataProperty
Returns a boolean expression where this property is less than or equal to the given literal.

Specified by:
le in interface DataProperty
Parameters:
value - the literal
Returns:
the boolean expression

between

public Expression between(java.lang.Object min,
                          java.lang.Object max)
Description copied from interface: DataProperty
Returns a 6 term expression, where this property is greater than or equal to the given 'min' literal, and is less than or equal tothe given 'max' literal.

Specified by:
between in interface DataProperty
Parameters:
min - the minimum literal
max - the maximum literal
Returns:
the expression

like

public Expression like(java.lang.String value)
Description copied from interface: DataProperty
Returns a wildcard expression where this property is like the given literal, and the literal may contain any number of wildcards, the wildcard character being '*'

Specified by:
like in interface DataProperty
Parameters:
value - the wildcard literal
Returns:
the wildcard expression

isNull

public Expression isNull()
Description copied from interface: DataProperty
Returns a boolean expression where this property is equal to null.

Specified by:
isNull in interface DataProperty
Returns:
the boolean expression

isNotNull

public Expression isNotNull()
Description copied from interface: DataProperty
Returns a boolean expression where this property is not equal to null.

Specified by:
isNotNull in interface DataProperty
Returns:
the boolean expression

in

public Expression in(Query subquery)
Description copied from interface: DataProperty
Returns a subquery expression, where this property is found within the given subquery results collection.

Specified by:
in in interface DataProperty
Parameters:
subquery - the subquery
Returns:
the subquery expression

notIn

public Expression notIn(Query subquery)
Description copied from interface: DataProperty
Returns a subquery expression, where this property is not found within the given subquery results collection.

Specified by:
notIn in interface DataProperty
Parameters:
subquery - the subquery
Returns:
the subquery expression

exists

public Expression exists(Query subquery)

getQuery

public Query getQuery()

setQuery

public void setQuery(Query value)

min

public DataProperty min()
Description copied from interface: DataProperty
Constructs a minimum aggregate within this data property and returns the data property for use in subsequent operations

Specified by:
min in interface DataProperty
Returns:
the data property

max

public DataProperty max()
Description copied from interface: DataProperty
Constructs a maximum aggregate within this data property and returns the data property for use in subsequent operations

Specified by:
max in interface DataProperty
Returns:
the data property

sum

public DataProperty sum()
Description copied from interface: DataProperty
Constructs a summation aggregate within this data property and returns the data property for use in subsequent operations

Specified by:
sum in interface DataProperty
Returns:
the data property

avg

public DataProperty avg()
Description copied from interface: DataProperty
Constructs a average aggregate within this data property and returns the data property for use in subsequent operations

Specified by:
avg in interface DataProperty
Returns:
the data property

asc

public DataProperty asc()
Description copied from interface: DataProperty
Constructs a ascending ordering within this data property and returns the data property for use in subsequent operations

Specified by:
asc in interface DataProperty
Returns:
the data property

desc

public DataProperty desc()
Description copied from interface: DataProperty
Constructs a descending ordering within this data property and returns the data property for use in subsequent operations

Specified by:
desc in interface DataProperty
Returns:
the data property

getAs

public Projection getAs()

setAs

public void setAs(Projection value)

getName

public java.lang.String getName()
Description copied from interface: DataProperty
returns the name of this property

Specified by:
getName in interface DataProperty
Returns:

setName

public void setName(java.lang.String value)

getPhysicalName

public java.lang.String getPhysicalName()

setPhysicalName

public void setPhysicalName(java.lang.String value)

getPhysicalNameBytes

public byte[] getPhysicalNameBytes()

setPhysicalNameBytes

public void setPhysicalNameBytes(byte[] value)

isValues

public boolean isValues()

setValues

public void setValues(java.lang.Boolean value)

isDistinct

public boolean isDistinct()
Description copied from interface: DataProperty
Gets the value of the distinct property.

Specified by:
isDistinct in interface DataProperty
Returns:
possible object is Boolean

setDistinct

public void setDistinct(java.lang.Boolean value)

getDirection

public SortDirectionValues getDirection()

setDirection

public void setDirection(SortDirectionValues value)

getFunction

public FunctionValues getFunction()

setFunction

public void setFunction(FunctionValues value)

asPathString

public java.lang.String asPathString()
Returns the path qualified name for this property, i.e. as the final element within its associated path, if a path exists for this property. If no path exists for this property, simply the name of the property is returned.

Returns:
the path qualified name for this property

accept

public void accept(QueryVisitor visitor)
Overrides:
accept in class AbstractProperty


Copyright © 2013. All Rights Reserved.