Package org.chromattic.core.mapper

Examples of org.chromattic.core.mapper.TypeMapper


    if (clazz == null) {
      throw new NullPointerException();
    }

    //
    TypeMapper typeMapper = domain.getTypeMapper(clazz);
    NodeType nodeType = sessionWrapper.getNodeType(typeMapper.getNodeDef().getPrimaryNodeTypeName());
    TransientContextState state = new TransientContextState(this, nodeType);

    //
    ObjectContext ctx = new ObjectContext(typeMapper, state);
View Full Code Here


  }

  public void nodeRead(Node node) throws RepositoryException {
    NodeType nodeType = node.getPrimaryNodeType();
    String nodeTypeName = nodeType.getName();
    TypeMapper mapper = domain.getTypeMapper(nodeTypeName);
    if (mapper != null) {
      String id = node.getUUID();
      ObjectContext ctx = contexts.get(id);
      if (ctx == null) {
        ctx = new ObjectContext(mapper);
View Full Code Here

  }

  public void nodeAdded(Node node, ObjectContext ctx) throws RepositoryException {
    NodeType nodeType = node.getPrimaryNodeType();
    String nodeTypeName = nodeType.getName();
    TypeMapper mapper = domain.getTypeMapper(nodeTypeName);
    if (mapper != null) {
      String id = node.getUUID();
      if (contexts.containsKey(id)) {
        String msg = "Attempt to replace an existing context " + ctx + " with id " + id;
        log.error(msg);
View Full Code Here

      throw new NullPointerException();
    }
    if (this.fromClass != null) {
      throw new IllegalStateException();
    }
    TypeMapper mapper = domain.getTypeMapper(fromClass);
    if (mapper == null) {
      throw new IllegalArgumentException("Class " + fromClass.getName() + " is not mapped");
    }
    this.mapper = mapper;
    this.fromClass = fromClass;
View Full Code Here

TOP

Related Classes of org.chromattic.core.mapper.TypeMapper

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.