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

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


    return typeDeclarations;
  }

  protected ITypeDeclaration buildTypeDeclaration(Class<?> javaType, Type genericType) {
    ITypeRepository typeRepository = getTypeRepository();
    IType type = typeRepository.getType(javaType);
    return new JavaTypeDeclaration(typeRepository, type, genericType, javaType.isArray());
  }
View Full Code Here


    // T[]
    if (genericType instanceof GenericArrayType) {
      GenericArrayType genericArrayType = (GenericArrayType) genericType;
      String arrayTypeName = buildArrayTypeName(genericArrayType.toString());
      IType arrayType = typeRepository.getType(arrayTypeName);

      return new JavaTypeDeclaration(
        typeRepository,
        arrayType,
        genericArrayType.getGenericComponentType(),
View Full Code Here

    // Retrieve the fully qualified enum type name
    String typeName = enumTypeName.substring(0, lastDotIndex);

    // Attempt to load the enum type
    IType type = loadTypeImp(typeName);
    return type.isEnum() ? type : null;
  }
View Full Code Here

      return null;
    }

    TypeHelper typeHelper = getTypeHelper();
    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 (typeHelper.isCollectionType(type)) {
View Full Code Here

  @Override
  protected IType resolveType() {

    TypeHelper typeHelper = getTypeHelper();
    ITypeDeclaration typeDeclaration = getTypeDeclaration();
    IType type = typeDeclaration.getType();

    // For a collection type, return the first type parameter
    if (typeHelper.isCollectionType(type)) {

      ITypeDeclaration[] typeParameters = typeDeclaration.getTypeParameters();
View Full Code Here

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

    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

    // so we can't resolve the type
    if (!expression.endsWithDot()) {

      // Check first to see if it's an enum type
      String path = expression.toActualText();
      IType type = queryContext.getTypeRepository().getEnumType(path);

      if (type != null) {
        resolver = buildEnumResolver(expression, type, path);
      }
      else {
View Full Code Here

    // so we can't resolve the type
    if (!expression.endsWithDot()) {

      // Check first to see if it's an enum type
      String path = expression.toActualText();
      IType type = queryContext.getTypeRepository().getEnumType(path);

      if (type != null) {
        resolver = buildEnumResolver(expression, type, path);
      }
      else {
View Full Code Here

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

    IType type = getParentType();

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

      String path = stateObject.toString();

      if (path.equals(oldEnumConstant)) {

        IType type = managedTypeProvider.getTypeRepository().getEnumType(path);

        if (type != null) {
          stateObject.setPath(newEnumConstant);
        }
      }
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.