Package com.tll.util

Examples of com.tll.util.PropertyPath.depth()


   * @param path
   * @return the clientized path
   */
  protected static final <T> String clientizePropertyPath(ISchemaInfo schemaInfo, Class<T> entityClass, String path) {
    final PropertyPath p = new PropertyPath(path);
    if(p.depth() > 2) {
      final String ppp = p.trim(1);
      final ISchemaProperty sp = schemaInfo.getSchemaProperty(entityClass, ppp);
      if(sp.getPropertyType().isNested()) {
        path = ppp + '_' + p.last();
      }
View Full Code Here


    Map<String, ISchemaProperty> classMap = getSchemaProperties(entityClass);

    if(!classMap.containsKey(propertyName)) {

      final PropertyPath p = new PropertyPath(propertyName);
      if(p.depth() > 1) {
        // attempt to resolve the given path to a relational property and a
        // localized path
        ISchemaProperty sp;
        for(int i = 0; i < p.depth(); i++) {
          sp = classMap.get(p.pathAt(i));
View Full Code Here

      final PropertyPath p = new PropertyPath(propertyName);
      if(p.depth() > 1) {
        // attempt to resolve the given path to a relational property and a
        // localized path
        ISchemaProperty sp;
        for(int i = 0; i < p.depth(); i++) {
          sp = classMap.get(p.pathAt(i));
          if(sp == null || !sp.getPropertyType().isRelational()) break;
          final RelationInfo ri = (RelationInfo) sp;
          if(!schemaMap.containsKey(ri.getRelatedType())) {
            load(ri.getRelatedType());
View Full Code Here

    }

    final PropertyPath pp = new PropertyPath(propPath);
    IModelProperty prop = null;
    Model model = this;
    final int len = pp.depth();
    for(int i = 0; i < len; i++) {
      final String pname = pp.nameAt(i);
      final int index;
      try {
        index = pp.indexAt(i);
View Full Code Here

            nearestParentRefPath = rootRelPath;
          }
          else {
            // resolve the nearest parent (relational or indexed prop)
            final PropertyPath pp = new PropertyPath(rootRelPath);
            if(pp.depth() > 1) {
              nearestParentRefPath = pp.trim(1);
            }
            else {
              nearestParentRefPath = "";
            }
View Full Code Here

    Map<String, ISchemaProperty> classMap = getSchemaProperties(entityClass);

    if(!classMap.containsKey(propertyName)) {

      final PropertyPath p = new PropertyPath(propertyName);
      if(p.depth() > 1) {
        // attempt to resolve the given path to a relational property and a
        // localized path
        ISchemaProperty sp;
        for(int i = 0; i < p.depth(); i++) {
          sp = classMap.get(p.pathAt(i));
View Full Code Here

      final PropertyPath p = new PropertyPath(propertyName);
      if(p.depth() > 1) {
        // attempt to resolve the given path to a relational property and a
        // localized path
        ISchemaProperty sp;
        for(int i = 0; i < p.depth(); i++) {
          sp = classMap.get(p.pathAt(i));
          if(sp == null || !sp.getPropertyType().isRelational()) break;
          final RelationInfo ri = (RelationInfo) sp;
          if(!schemaMap.containsKey(ri.getRelatedType())) {
            load(ri.getRelatedType());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.