Tabnine Logo
EntityMetamodel.entity
Code IndexAdd Tabnine to your IDE (free)

How to use
entity
method
in
com.blazebit.persistence.parser.EntityMetamodel

Best Java code snippets using com.blazebit.persistence.parser.EntityMetamodel.entity (Showing top 20 results out of 315)

origin: Blazebit/blaze-persistence

private EntityType<?> getTreatType(EntityMetamodel metamodel, Class<?> baseType, Class<?> subtype) {
  if (baseType == subtype) {
    return null;
  }
  return metamodel.entity(subtype);
}
origin: com.blazebit/blaze-persistence-jpa-criteria-impl

protected final <T> EntityType<T> getTreatType(Class<T> type) {
  return criteriaBuilder.getEntityMetamodel().entity(type);
}
origin: Blazebit/blaze-persistence

protected final <T> EntityType<T> getTreatType(Class<T> type) {
  return criteriaBuilder.getEntityMetamodel().entity(type);
}
origin: com.blazebit/blaze-persistence-jpa-criteria-impl

public <X> BlazeRoot<X> from(Class<X> entityClass, String alias) {
  EntityType<X> entityType = criteriaBuilder.getEntityMetamodel().entity(entityClass);
  if (entityType == null) {
    throw new IllegalArgumentException(entityClass + " is not an entity");
  }
  return from(entityType, alias);
}
origin: com.blazebit/blaze-persistence-jpa-criteria-impl

public BlazeRoot<T> from(Class<T> entityClass, String alias) {
  EntityType<T> entityType = criteriaBuilder.getEntityMetamodel()
      .entity(entityClass);
  if (entityType == null) {
    throw new IllegalArgumentException(entityClass + " is not an entity");
  }
  return from(entityType, alias);
}
origin: Blazebit/blaze-persistence

public <X> BlazeRoot<X> from(Class<X> entityClass, String alias) {
  EntityType<X> entityType = criteriaBuilder.getEntityMetamodel().entity(entityClass);
  if (entityType == null) {
    throw new IllegalArgumentException(entityClass + " is not an entity");
  }
  return from(entityType, alias);
}
origin: Blazebit/blaze-persistence

public BlazeRoot<T> from(Class<T> entityClass, String alias) {
  EntityType<T> entityType = criteriaBuilder.getEntityMetamodel()
      .entity(entityClass);
  if (entityType == null) {
    throw new IllegalArgumentException(entityClass + " is not an entity");
  }
  return from(entityType, alias);
}
origin: com.blazebit/blaze-persistence-jpa-criteria-impl

@Override
public <Y> BlazeJoin<X, Y> join(Class<Y> entityTypeClass, String alias) {
  return join(criteriaBuilder.getEntityMetamodel().entity(entityTypeClass), alias, DEFAULT_JOIN_TYPE);
}
origin: Blazebit/blaze-persistence

@Override
public <Y> BlazeJoin<X, Y> join(Class<Y> entityTypeClass) {
  return join(criteriaBuilder.getEntityMetamodel().entity(entityTypeClass), null, DEFAULT_JOIN_TYPE);
}
origin: com.blazebit/blaze-persistence-jpa-criteria-impl

@Override
public <Y> BlazeJoin<X, Y> join(Class<Y> entityTypeClass, String alias, JoinType joinType) {
  return join(criteriaBuilder.getEntityMetamodel().entity(entityTypeClass), alias, joinType);
}
origin: com.blazebit/blaze-persistence-jpa-criteria-impl

@Override
public <Y> BlazeJoin<X, Y> join(Class<Y> entityTypeClass, JoinType joinType) {
  return join(criteriaBuilder.getEntityMetamodel().entity(entityTypeClass), null, joinType);
}
origin: com.blazebit/blaze-persistence-jpa-criteria-impl

@Override
public <Y> BlazeJoin<X, Y> join(Class<Y> entityTypeClass) {
  return join(criteriaBuilder.getEntityMetamodel().entity(entityTypeClass), null, DEFAULT_JOIN_TYPE);
}
origin: Blazebit/blaze-persistence

@Override
public <Y> BlazeJoin<X, Y> join(Class<Y> entityTypeClass, String alias) {
  return join(criteriaBuilder.getEntityMetamodel().entity(entityTypeClass), alias, DEFAULT_JOIN_TYPE);
}
origin: Blazebit/blaze-persistence

@Override
public <Y> BlazeJoin<X, Y> join(Class<Y> entityTypeClass, String alias, JoinType joinType) {
  return join(criteriaBuilder.getEntityMetamodel().entity(entityTypeClass), alias, joinType);
}
origin: Blazebit/blaze-persistence

@Override
public <Y> BlazeJoin<X, Y> join(Class<Y> entityTypeClass, JoinType joinType) {
  return join(criteriaBuilder.getEntityMetamodel().entity(entityTypeClass), null, joinType);
}
origin: Blazebit/blaze-persistence

@Override
public String determineInheritanceMapping(MetamodelBuildingContext context) {
  if (inheritanceMapping == null && !inheritanceSupertypes.isEmpty()) {
    // Check all super type inheritance mappings. If we encounter that a super type uses
    // an entity class that is not a proper super type of our entity class, we can't infer a type inheritance mapping
    for (ViewMapping supertypeMapping : inheritanceSupertypes) {
      Class<?> supertypeEntityClass = supertypeMapping.getEntityClass();
      if (!supertypeEntityClass.isAssignableFrom(entityClass) || supertypeEntityClass == entityClass) {
        return inheritanceMapping;
      }
    }
    // If we get here, we know that our entity class type is a proper subtype of all super type inheritance mappings
    return "TYPE(this) = " + context.getEntityMetamodel().entity(entityClass).getName();
  }
  return inheritanceMapping;
}
origin: Blazebit/blaze-persistence

protected final void setTreatType(Class<? extends X> treatType) {
  if (treatType.isAssignableFrom(getJavaType())) {
    return;
  }
  if (treatJoinType != null) {
    throw new IllegalArgumentException("Invalid multiple invocations of treat on join: " + getPathExpression());
  }
  treatJoinType = criteriaBuilder.getEntityMetamodel().entity(treatType);
  setJavaType(treatJoinType.getJavaType());
}
origin: com.blazebit/blaze-persistence-jpa-criteria-impl

protected final void setTreatType(Class<? extends X> treatType) {
  if (treatType.isAssignableFrom(getJavaType())) {
    return;
  }
  if (treatJoinType != null) {
    throw new IllegalArgumentException("Invalid multiple invocations of treat on join: " + getPathExpression());
  }
  treatJoinType = criteriaBuilder.getEntityMetamodel().entity(treatType);
  setJavaType(treatJoinType.getJavaType());
}
origin: Blazebit/blaze-persistence

protected static javax.persistence.metamodel.SingularAttribute jpaIdOf(EntityViewManagerImpl evm, ManagedViewType<?> subviewType) {
  if (subviewType instanceof ViewType<?>) {
    return JpaMetamodelUtils.getSingleIdAttribute(evm.getMetamodel().getEntityMetamodel().entity(subviewType.getEntityClass()));
  }
  return null;
}
origin: Blazebit/blaze-persistence

public InverseViewToEntityMapper(EntityViewManagerImpl evm, ViewType<?> childViewType, Mapper<Object, Object> parentEntityOnChildViewMapper, Mapper<Object, Object> parentEntityOnChildEntityAddMapper, Mapper<Object, Object> parentEntityOnChildEntityRemoveMapper,
                 ViewToEntityMapper elementViewToEntityMapper, DirtyAttributeFlusher<?, Object, Object> parentReferenceAttributeFlusher, DirtyAttributeFlusher<?, Object, Object> idAttributeFlusher) {
  this.elementViewToEntityMapper = elementViewToEntityMapper;
  this.viewIdAccessor = Accessors.forViewId(evm, childViewType, true);
  // TODO: this should be the same loader that the viewToEntityMapper uses
  this.entityLoader = new ReferenceEntityLoader(evm, childViewType, EntityViewUpdaterImpl.createViewIdMapper(evm, childViewType));
  this.persistAllowed = false;
  EntityType<?> entityType = evm.getMetamodel().getEntityMetamodel().entity(childViewType.getEntityClass());
  this.parentEntityOnChildViewMapper = parentEntityOnChildViewMapper;
  this.parentEntityOnChildEntityAddMapper = parentEntityOnChildEntityAddMapper;
  this.parentEntityOnChildEntityRemoveMapper = parentEntityOnChildEntityRemoveMapper;
  this.updatePrefixString = "UPDATE " + entityType.getName() + " e SET ";
  if (idAttributeFlusher == null) {
    this.updatePostfixString = " WHERE e." + JpaMetamodelUtils.getSingleIdAttribute(entityType).getName() + " = :" + ID_PARAM_NAME;
  } else {
    StringBuilder sb = new StringBuilder();
    sb.append(" WHERE ");
    idAttributeFlusher.appendUpdateQueryFragment(null, sb, "e.", "_", " AND ");
    this.updatePostfixString = sb.toString();
  }
  this.parentReferenceAttributeFlusher = parentReferenceAttributeFlusher;
  this.idAttributeFlusher = idAttributeFlusher;
  this.fullUpdateQueryString = createQueryString(null, parentReferenceAttributeFlusher);
}
com.blazebit.persistence.parserEntityMetamodelentity

Popular methods of EntityMetamodel

  • getEntity
  • getManagedType
  • managedType
  • type

Popular in Java

  • Updating database using SQL prepared statement
  • putExtra (Intent)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getSupportFragmentManager (FragmentActivity)
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • Permission (java.security)
    Legacy security code; do not use.
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • JTable (javax.swing)
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now