Examples of CompositeName


Examples of javax.naming.CompositeName

                }
                return ctx.lookup(name);
            } else {
                // Split out the first name of the path
                // and look for it in the bindings map.
                CompositeName path = new CompositeName(name);

                if (path.size() == 0) {
                    return this;
                } else {
                    String first = path.get(0);
                    Object value = bindings.get(first);
                    if (value == null) {
                        throw new NameNotFoundException(name);
                    } else if (value instanceof Context && path.size() > 1) {
                        Context subContext = (Context)value;
                        value = subContext.lookup(path.getSuffix(1));
                    }
                    return value;
                }
            }
        }
View Full Code Here

Examples of org.jboss.fresh.naming.CompositeName

     
      if(fc.isDirectory()) head.append("D");
      else head.append(" ");
     
      if(fc.isNew()) {
        CompositeName absname = root.absolutize(fname);
        head.append("+                 ").append(absname);
       
        if(cb!=null) cb.fileAdded(absname, fc);
       
        System.out.println(head);
        //System.out.print("+");
        //if(fc.isMissing())
        //  System.out.print("-");

        //if(fc.isDirectory()) { 
        //  System.out.println("D");
        //} else {
        //  System.out.println();
        //}

      } else if(fc.isMissing()) {
        //System.out.print("-");
        CompositeName absname = root.absolutize(fname);
        head.append("-                 ").append(absname);
       
        if(cb!=null) cb.fileRemoved(absname, fc);
       
        System.out.println(head);
        //if(fc.isDirectory()) { 
        //  System.out.println("D");
        //} else {
        //  System.out.println();
        //}

      } else {

        //if(fc.isDirectory())
        //  System.out.print("D");

        CompositeName absname = root.absolutize(fname);

        head.append(fc.isContentDiff() ? " C " : "   ");

        int mod=fc.compareLastModified();
        //if(mod<0) System.out.print(" < lastModified ");
View Full Code Here

Examples of org.objectweb.jorm.metainfo.api.CompositeName

            clazzWithIdField.identity.oidClassAutoCalculated = true;
            clazzWithIdField.identity.objectidClass = objectidClass;
        }
        Manager manager = (Manager) jc.getPackage().getParent();
        //The user has specified an object id ==> use it for the namedef
        CompositeName cn = manager.getCompositeName(objectidClass);
        boolean cnNotDefined = (cn == null);
        if (cnNotDefined) {
      if (debug) {
        logger.log(BasicLevel.DEBUG, "\tCreate the composite name " + objectidClass);
      }
            cn = manager.createCompositeName(objectidClass);
            createdMOs.add(cn);
        }
        NameRef nr = nd.createNameRef(cn);
        for (int i = 0; i < idFields.size(); i++) {
            SpeedoField pkField = (SpeedoField) idFields.get(i);
            int size = PType.NOSIZE;
            int scale = PType.NOSIZE;
            if (pkField.columns != null && pkField.columns.length == 1) {
                if (pkField.columns[0].length != -1) {
                    size = pkField.columns[0].length;
                }
                if (pkField.columns[0].scale!= -1) {
                    scale = pkField.columns[0].scale;
                }
            }
            if (cnNotDefined) {
                cn.createCompositeNameField(pkField.name,
                        mibh.getPrimitivePType(Type.getType(pkField.type)),
                        size, scale);
            }
            nr.addProjection(pkField.name, pkField.name);
        }
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.