Package com.tll.model.schema

Examples of com.tll.model.schema.BusinessObject


   * @param entityClass
   * @return Set of bk definitions or <code>null</code> if no business keys are
   *         defined for the given entity class.
   */
  private static <E extends IEntity> Set<IBusinessKeyDefinition<E>> discoverBusinessKeys(Class<E> entityClass) {
    BusinessObject bo = entityClass.getAnnotation(BusinessObject.class);
    if(bo == null) {
      // try the root entity
      bo = EntityUtil.getRootEntityClass(entityClass).getAnnotation(BusinessObject.class);
    }
    if(bo == null) {
      // no bks defined
      return null;
    }
    final Set<IBusinessKeyDefinition<E>> set = new HashSet<IBusinessKeyDefinition<E>>();
    for(final BusinessKeyDef def : bo.businessKeys()) {
      set.add(new BusinessKeyDefinition<E>(entityClass, def.name(), def.properties()));
    }
    return set;
  }
View Full Code Here

TOP

Related Classes of com.tll.model.schema.BusinessObject

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.