Package org.eclipse.persistence.jpa.jpql.spi

Examples of org.eclipse.persistence.jpa.jpql.spi.IType


   */
  @Override
  protected IType buildType() {

    ITypeDeclaration typeDeclaration = getTypeDeclaration();
    IType type = typeDeclaration.getType();

    // For a collection type, return the first type parameter
    if (getTypeHelper().isCollectionType(type)) {
      ITypeDeclaration[] typeParameters = typeDeclaration.getTypeParameters();
      if (typeParameters.length > 0) {
View Full Code Here


   */
  @Override
  protected IManagedType resolveManagedType(IMapping mapping) {

    ITypeDeclaration typeDeclaration = mapping.getTypeDeclaration();
    IType type = typeDeclaration.getType();

    // Collection type cannot be traversed
    if (getTypeHelper().isCollectionType(type)) {
      ITypeDeclaration[] typeParameters = typeDeclaration.getTypeParameters();
      if (typeParameters.length == 0) {
View Full Code Here

   * have been converted into the class of that primitive
   */
  public IType convertPrimitive(IType type) {

    // byte
    IType newType = toByteType(type);
    if (newType != type) {
      return newType;
    }

    // short
View Full Code Here

        return true;
      }

      // Determine if it's assignable to the desired type
      IType mappingType = value.getType();
      mappingType = queryContext.getTypeHelper().convertPrimitive(mappingType);
      return mappingType.isAssignableTo(type);
    }
View Full Code Here

   */
  @Override
  IType buildType() {

    // Check first to see if the path expression is actually representing an enum constant
    IType type = getEnumType();

    if (type != null) {
      return type;
    }

View Full Code Here

   * {@inheritDoc}
   */
  @Override
  ITypeDeclaration buildTypeDeclaration() {

    IType type = getEnumType();

    if (type != null) {
      enumType = Boolean.TRUE;
      return type.getTypeDeclaration();
    }
    else {
      enumType = Boolean.FALSE;
      return super.buildTypeDeclaration();
    }
View Full Code Here

    if (mapping == null) {
      return null;
    }

    ITypeDeclaration typeDeclaration = mapping.getTypeDeclaration();
    IType type = typeDeclaration.getType();

    // Collection type cannot be traversed
    if (getTypeHelper().isCollectionType(type)) {
      ITypeDeclaration[] typeParameters = typeDeclaration.getTypeParameters();
      if (typeParameters.length == 0) {
View Full Code Here

    if (mapping == null) {
      return null;
    }

    ITypeDeclaration typeDeclaration = mapping.getTypeDeclaration();
    IType type = typeDeclaration.getType();

    // Collection type cannot be traversed
    // Example: SELECT e.employees. FROM Employee e where employees is a collection,
    // it cannot be traversed
    if (getTypeHelper().isCollectionType(type)) {
View Full Code Here

        return true;
      }

      // Determine if it's assignable to the desired type
      IType mappingType = value.getType();
      mappingType = getTypeHelper().convertPrimitive(mappingType);
      return mappingType.isAssignableTo(type);
    }
View Full Code Here

   * {@inheritDoc}
   */
  @Override
  IType buildType() {

    IType type = getParentType();

    // Anything else is an invalid type
    if (!getTypeHelper().isNumericType(type)) {
      type = getTypeHelper().objectType();
    }
View Full Code Here

TOP

Related Classes of org.eclipse.persistence.jpa.jpql.spi.IType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.