Tabnine Logo
EntityPath
Code IndexAdd Tabnine to your IDE (free)

How to use
EntityPath
in
com.mysema.query.types

Best Java code snippets using com.mysema.query.types.EntityPath (Showing top 13 results out of 315)

origin: com.mysema.querydsl/querydsl-hql

private void handleJoinTarget(JoinExpression je) {
  // type specifier
  if (je.getTarget() instanceof EntityPath<?>) {
    EntityPath<?> pe = (EntityPath<?>) je.getTarget();
    if (pe.getMetadata().getParent() == null) {
      if (pe.getType().getPackage() != null){
        String pn = pe.getType().getPackage().getName();
        String typeName = pe.getType().getName().substring(pn.length() + 1);
        append(typeName);    
      }else{
        append(pe.getType().getName());
      }                
      append(" ");
    }
  }
  handle(je.getTarget());
}
origin: com.mysema.querydsl/querydsl-hql

public HibernateUpdateClause(SessionHolder session, EntityPath<?> entity, JPQLTemplates templates) {
  this.session = session;
  this.templates = templates;
  metadata.addJoin(JoinType.DEFAULT, entity.asExpr());
}
origin: com.mysema.querydsl/querydsl-core

/**
 * @param newPath
 * @param path
 * @return
 */
private <P extends Path<?>> P  addMetadataOf(P newPath, Path<?> path) {
  if (path.getMetadata().getParent() instanceof EntityPath) {
    EntityPath<?> parent = (EntityPath)path.getMetadata().getParent();
    propertyMetadata.put(newPath, parent.getMetadata(path));
  }
  return newPath;
}
origin: com.mysema.querydsl/querydsl-mongodb

public MorphiaQuery(Morphia morphia, Datastore datastore,
          EntityCache cache, EntityPath<K> entityPath) {
  this(morphia, datastore, cache, entityPath.getType());
}
origin: com.mysema.querydsl/querydsl-sql

public static String getName(Path<?> path) {
  Path<?> parent = path.getMetadata().getParent();
  if (parent instanceof EntityPath) {
    Object columnMetadata = ((EntityPath<?>) parent).getMetadata(path);
    if (columnMetadata instanceof ColumnMetadata) {
      return ((ColumnMetadata)columnMetadata).getName();
    }
  }
  return path.getMetadata().getName();
}
origin: com.mysema.querydsl/querydsl-jdo

@Override
public long execute() {
  Query query = persistenceManager.newQuery(entity.getType());
  if (metadata.getWhere() != null) {
    JDOQLSerializer serializer = new JDOQLSerializer(templates, entity);
origin: com.mysema.rdf/rdfbean-tapestry

/**
 * Create a new BeanGridDataSource instance with filter conditions
 * 
 * @param sessionFactory
 * @param entity
 *            root entity of the query
 * @param defaultOrder
 *            default order for queries, if no order is specified
 * @param caseSensitive
 *            case sensitive ordering
 * @param conditions
 *            filter conditions
 */
@SuppressWarnings("unchecked")
public BeanGridDataSource(SessionFactory sessionFactory, EntityPath<T> entity, OrderSpecifier<?> defaultOrder, boolean caseSensitive, @Nullable Predicate conditions) {
  this.sessionFactory = Assert.notNull(sessionFactory, "sessionFactory");
  this.entityType = (Class<T>) Assert.notNull(entity.getType(), "entity has no type");
  this.entityPath = new PathBuilder<T>(entity.getType(), entity.getMetadata());
  this.defaultOrder = Assert.notNull(defaultOrder, "defaultOrder");
  this.conditions = conditions;
  this.caseSensitive = caseSensitive;
}
origin: com.mysema.querydsl/querydsl-sql

/**
 * Returns this path's column metadata if present. Otherwise returns default
 * metadata where the column name is equal to the path's name.
 */
public static ColumnMetadata getColumnMetadata(Path<?> path) {
  Path<?> parent = path.getMetadata().getParent();
  if (parent instanceof EntityPath) {
    Object columnMetadata = ((EntityPath<?>) parent).getMetadata(path);
    if (columnMetadata instanceof ColumnMetadata) {
      return (ColumnMetadata)columnMetadata;
    }
  }
  return ColumnMetadata.named(path.getMetadata().getName());
}
origin: com.mysema.querydsl/querydsl-hql

public HibernateDeleteClause(SessionHolder session, EntityPath<?> entity, JPQLTemplates templates){
  this.session = session;
  this.templates = templates;
  md.addJoin(JoinType.DEFAULT, entity.asExpr());
}
origin: com.mysema.querydsl/querydsl-jdo

private void serializeVariables(List<JoinExpression> joins) {
  append(VARIABLES);
  for (int i = 1; i < joins.size(); i++) {
    final JoinExpression je = joins.get(i);
    if (i > 1) {
      append("; ");
    }
    // type specifier
    if (je.getTarget() instanceof EntityPath) {
      final EntityPath<?> pe = (EntityPath<?>) je.getTarget();
      if (pe.getMetadata().getParent() == null) {
        append(pe.getType().getName()).append(" ");
      }
    }
    handle(je.getTarget());
  }
}
origin: com.mysema.querydsl/querydsl-hql

public JPAUpdateClause(EntityManager em, EntityPath<?> entity, JPQLTemplates templates){
  this.entityManager = em;
  this.templates = templates;
  metadata.addJoin(JoinType.DEFAULT, entity.asExpr());
}
origin: com.mysema.querydsl/querydsl-jpa

public static void orderBy(JPACommonQuery<?> query, EntityPath<?> entity, List<String> order) {
  PathBuilder<?> builder = new PathBuilder(entity.getType(), entity.getMetadata());
  Map<String, PathBuilder<?>> joins = Maps.newHashMap();
  for (String entry : order) {
    String[] tokens = DOT.split(entry);
    if (tokens.length > 1) {
      String[] parent = new String[tokens.length - 1];
      System.arraycopy(tokens, 0, parent, 0, tokens.length - 1);
      PathBuilder<?> parentAlias = join(query, builder, joins, StringUtils.join(parent, "."));
      query.orderBy(parentAlias.getString(tokens[tokens.length - 1]).asc());
    } else {
      query.orderBy(builder.getString(tokens[0]).asc());
    }
  }
}
origin: com.mysema.querydsl/querydsl-hql

public JPADeleteClause(EntityManager entityManager, EntityPath<?> entity, JPQLTemplates templates){
  this.entityManager = entityManager;
  this.templates = templates;
  metadata.addJoin(JoinType.DEFAULT, entity.asExpr());
}
com.mysema.query.typesEntityPath

Javadoc

EntityPath is the common interface for entity path expressions

Most used methods

  • getMetadata
    Returns additional metadata for the given property path or null if none is available
  • getType
  • asExpr

Popular in Java

  • Making http post requests using okhttp
  • requestLocationUpdates (LocationManager)
  • getSharedPreferences (Context)
  • onRequestPermissionsResult (Fragment)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • URI (java.net)
    A Uniform Resource Identifier that identifies an abstract or physical resource, as specified by RFC
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • 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