Package org.objectweb.jorm.metainfo.api

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


    public void process() throws SpeedoException {
        if (scp.getXmldescriptor().isEmpty()) {
          return;
        }
        if (logger.isLoggable(BasicLevel.DEBUG)) {
            Manager m = jormcompiler.getMIManager();
            for (Iterator it = m.getClasses().iterator(); it.hasNext();) {
                logger.log(BasicLevel.DEBUG, "Class : "
                        + ((Class) it.next()).getFQName());
            }
            for (Iterator it = m.getCompositeNames().iterator(); it.hasNext();) {
                logger.log(BasicLevel.DEBUG, "CompositeName : "
                        + ((CompositeName) it.next()).getFQName());
            }
        }
      try {
View Full Code Here


     */
    protected void isCompatible() throws SpeedoException {

        List except = new ArrayList();

        Manager manager = jormcompiler.getMIManager();
        for (Iterator itDesc = scp.getXmldescriptor().values().iterator(); itDesc.hasNext();) {
            SpeedoXMLDescriptor desc = (SpeedoXMLDescriptor) itDesc.next();
            List scs = desc.getSpeedoClasses();
            for (int i=0; i<scs.size(); i++) {
                compareClass((SpeedoClass) scs.get(i), manager, except);
View Full Code Here

        // create representations of the parameters list and the variable list
        /*
        toHashtableParams(qd.parameters, ";,");
        toHashtableVars(qd.variables, ";,");
        */
        Manager miManager = mapper.getMetaInfoManager();
        if (miManager == null)
            throw new SpeedoException(
                    "A non null Meta information manager is needed");
        SimpleNode node = null;
        try {
View Full Code Here

        filter = '(' + filter + ')';
        // create representations of the parameters list and the variable
        // list
        toHashtableParams(qd.parameters, ";,");
        toHashtableVars(qd.variables, ";,");
        Manager miManager = mapper.getMetaInfoManager();
        if (miManager == null)
            throw new SpeedoException(
                    "A non null Meta information manager is needed");
        try {
            jf.getPClassMapping(
View Full Code Here

        if (objectidClass == null && sc.generateObjectId()) {
            objectidClass = NamingRules.generatedObjectIdName(clazzWithIdField.getFQName());
            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);
View Full Code Here

    private void defineClassReferenceNameDef(NameDef nd,
            ClassRef cr,
            SpeedoField sf,
            MIBuilderHelper mibh,
            String prefix) throws SpeedoException, PException {
        Manager manager = mibh.getManager(cr);
        SpeedoClass referencedClass = sf.moClass.getSpeedoClassFromContext(
                cr.getMOClass().getFQName());
    SpeedoClass clazzWithIdField = referencedClass.getAncestor();
    if (clazzWithIdField == null) {
        clazzWithIdField = referencedClass;
    }
        CompositeName cn = manager.getCompositeName(clazzWithIdField.identity.objectidClass);
        NameRef nr = nd.createNameRef(cn);
        List idFields = clazzWithIdField.getPKFields();
        for (int i = 0; i < idFields.size(); i++) {
            SpeedoField pkField = (SpeedoField) idFields.get(i);
            int size = PType.NOSIZE;
View Full Code Here

        throw new SpeedoException(
          mibh.getErrorMessage(sc, sc.jormclass, null)
          + " Impossible to get the field '" + lidname + "'");
      }
    }
        Manager manager = mibh.getManager(jc);
        CompositeName cn = getLongIdCompositeName(manager);
    NameRef nr = nd.createNameRef(cn);
    nr.addProjection(getLongIdLid(), lid.getName());
    if (sc.jormclass.getSuperClasses().isEmpty()) {
      // define the inheritance filter permiting to determine the class
View Full Code Here

    String lidname = mibh.getNameDefFieldPrefix(cr, false, false, sf)
      + getHiddenLidFieldName();
        SpeedoClass referencedClass = sf.moClass.getSpeedoClassFromContext(
                cr.getMOClass().getFQName());
        //get the composite name
        Manager manager = mibh.getManager(cr);
        CompositeName cn = getLongIdCompositeName(manager);
    NameRef nr = nd.createNameRef(cn);
    //create the hidden field
    mibh.createNameDefField(cr.getParent(), lidname, getFieldType());
    //define translation betwen the composite name field and the hidden field
View Full Code Here

    String lidname = mibh.getNameDefFieldPrefix(cr, false, true, sf)
      + getHiddenLidFieldName();
        SpeedoClass referencedClass = sf.moClass.getSpeedoClassFromContext(
                cr.getMOClass().getFQName());
        //get the composite name
    Manager manager = mibh.getManager(cr);
        CompositeName cn = getLongIdCompositeName(manager);
    NameRef nr = nd.createNameRef(cn);
    //create the hidden field
    mibh.createNameDefField(cr.getParent(), lidname, getFieldType());
    //define translation betwen the composite name field and the hidden field
View Full Code Here

            MetaObject owner,
            MIBuilderHelper mibh,
            String prefix) throws SpeedoException, PException{
        PrimitiveElement oid = mibh.createNameDefField(owner, prefix + OID, PTypeSpace.LONG);
        PrimitiveElement cid = mibh.createNameDefField(owner, prefix + CID, PTypeSpace.LONG);
        Manager manager = mibh.getManager(owner);
        CompositeName speedoidcn = getPolymorphIdCN(manager);
        NameRef nr = nd.createNameRef(speedoidcn);
        nr.addProjection(POLYMORH_ID_OID, oid.getName());
        nr.addProjection(POLYMORH_ID_CID, cid.getName());
    }
View Full Code Here

TOP

Related Classes of org.objectweb.jorm.metainfo.api.Manager

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.