Package org.objectweb.jorm.api

Examples of org.objectweb.jorm.api.PException


          pem = (RdbPrimitiveElementMapping)
            trcm.getPrimitiveElementMapping(fieldName, true);
            current = sc.getSuper();
        }
        if (pem == null) {
            throw new PException("No mapping found for the field '"
                    + fieldName + "' for the class '" + sc.getFQName()
                    + "' or its parent.");
        }
        return pem;
    }
View Full Code Here


    try {
      return (PBinder) classLoader.loadClass(
        getBinderClassNameFromHints(hints, getName())).newInstance();
    } catch (Exception e) {
      throw new PException(e,
          "Impossible to instanciate the binder of the class "
          + hints);
    }
  }
View Full Code Here

            delegatedBinder.setPType(pcm.getPType());
            //link the PClassMapping
            polymorphicPNC.setPcm(delegatedBinder.getBinderClassMapping());
          }
        } catch (Exception e) {
          throw new PException(e,
            "Impossible to instanciate the PNC of the class "
            + hints);
        }
        if (register) {
          cn2pnc.put(tokens[PCLASS_IDX], pnc);
View Full Code Here

        for(int i=0; i<namingManagers.length; i++) {
            if (namingManagers[i].canProvidePBinder(hints, classloader)) {
                return namingManagers[i];
            }
        }
        throw new PException("No identity manager found for the hints '"
                + hints + "'.");
    }
View Full Code Here

            PName pn = namingManagers[i].decode(pnc, oid, clazz, jf);
            if (pn != null) {
                return pn;
            }
        }
        throw new PException("No identity manager able to decode:"
                + "\n\tpnc=" + pnc
        + "\n\toid=" + oid
        + "\n\tclazz=" + clazz);
    }
View Full Code Here

            Object o = namingManagers[i].encode(pn);
            if (o != null) {
                return o;
            }
        }
        throw new PException("No identity manager able to encode ("
                + pn + ")");
    }
View Full Code Here

      String sequencePrefix = (className.lastIndexOf('.') != -1) ? className.substring(0, className.lastIndexOf('.')+1):"";
      sequencePrefix = StringReplace.replaceString("/", "", sequencePrefix);
      SpeedoSequenceItf sequence = (SpeedoSequenceItf) pmf.getSequenceManager()
        .getSequence(sequencePrefix + tokens[SEQ_NAME_IDX]);
      if (sequence == null) {
        throw new PException("Wrong sequence name: " + sequencePrefix + tokens[SEQ_NAME_IDX]);
      }
      sequence.getLongGen();
      binder.setSequence(sequence);
    }
        return binder;
View Full Code Here

          fieldPType = PTypeSpace.OBJLONG;
        } else if ("long".equals(sf.type())) {
          fieldType = Long.TYPE;
          fieldPType = PTypeSpace.LONG;
        } else {
          throw new PException(
              "Impossible to use an auto incremented identifier: " +
              "the field type of '" + sf.name + "' is '" + sf.type()
              + "' and 'java.lang.Long' or 'long' is expected (class '"
              + sc.getFQName() + "'.");
        }
View Full Code Here

  public void init() throws PException {
    if (getMapper() != null) {
      return;
    }
    if (mapper == null) {
      throw new PException("No mapper assigned");
    }
    setPMapper(mapper);
    mapper = null;
  }
View Full Code Here

    if (binderInfo.startsWith(getBinderForGenClass())) {
      return newGenClassPBinder();
    } else if (binderInfo.startsWith(getBinderForClass())) {
      return newClassPBinder(className, null);
    } else {
      throw new PException("Bad binder info: " + binderInfo);
    }
  }
View Full Code Here

TOP

Related Classes of org.objectweb.jorm.api.PException

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.