org.modeshape.jcr.query

## Class QueryBuilder.CastAs<ReturnType>

- java.lang.Object
- - org.modeshape.jcr.query.QueryBuilder.CastAs<ReturnType>

- Direct Known Subclasses:
    QueryBuilder.CastAsLowerBoundary, QueryBuilder.CastAsRightHandSide, QueryBuilder.CastAsUpperBoundary
  Enclosing class:
    QueryBuilder

      public abstract class QueryBuilder.CastAs<ReturnType>
      extends Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Object` | `value`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `QueryBuilder.CastAs(Object value)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract ReturnType` | `as(String type)` Define the right-hand side literal value cast as the specified type.
    `ReturnType` | `asBoolean()` Define the right-hand side literal value cast as a `PropertyType.BOOLEAN`.
    `ReturnType` | `asDate()` Define the right-hand side literal value cast as a `PropertyType.DATE`.
    `ReturnType` | `asDouble()` Define the right-hand side literal value cast as a `PropertyType.DOUBLE`.
    `ReturnType` | `asLong()` Define the right-hand side literal value cast as a `PropertyType.LONG`.
    `ReturnType` | `asPath()` Define the right-hand side literal value cast as a `PropertyType.PATH`.
    `ReturnType` | `asString()` Define the right-hand side literal value cast as a `PropertyType.STRING`.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### value

          protected final Object value

  - ### Constructor Detail

    - #### QueryBuilder.CastAs

          protected QueryBuilder.CastAs(Object value)

  - ### Method Detail

    - #### as

          public abstract ReturnType as(String type)

      Define the right-hand side literal value cast as the specified type.
      Parameters:
        `type` - the property type; may not be null
      Returns:
        the constraint builder; never null

    - #### asString

          public ReturnType asString()

      Define the right-hand side literal value cast as a `PropertyType.STRING`.
      Returns:
        the constraint builder; never null

    - #### asBoolean

          public ReturnType asBoolean()

      Define the right-hand side literal value cast as a `PropertyType.BOOLEAN`.
      Returns:
        the constraint builder; never null

    - #### asLong

          public ReturnType asLong()

      Define the right-hand side literal value cast as a `PropertyType.LONG`.
      Returns:
        the constraint builder; never null

    - #### asDouble

          public ReturnType asDouble()

      Define the right-hand side literal value cast as a `PropertyType.DOUBLE`.
      Returns:
        the constraint builder; never null

    - #### asDate

          public ReturnType asDate()

      Define the right-hand side literal value cast as a `PropertyType.DATE`.
      Returns:
        the constraint builder; never null

    - #### asPath

          public ReturnType asPath()

      Define the right-hand side literal value cast as a `PropertyType.PATH`.
      Returns:
        the constraint builder; never null

Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.