net.sf.mmapps.commons.bridge
Class CloneUtil

java.lang.Object
  extended by net.sf.mmapps.commons.bridge.CloneUtil

public class CloneUtil
extends java.lang.Object


Method Summary
static void cloneAliasses(org.mmbase.bridge.Node localNode, org.mmbase.bridge.Node destNode)
           
static org.mmbase.bridge.Node cloneNode(org.mmbase.bridge.Node localNode)
          Clone a node to a cloud, including any fields without keeping administrative information
static void cloneNodeField(org.mmbase.bridge.Node sourceNode, org.mmbase.bridge.Node destinationNode, org.mmbase.bridge.Field field)
          cloneNodeField copies node fields from one node to an other
static org.mmbase.bridge.Node cloneNodeWithRelations(org.mmbase.bridge.Node localNode)
          Clone a node with all relations
static org.mmbase.bridge.Node cloneRelation(org.mmbase.bridge.Node localRelation)
           
static org.mmbase.bridge.Node cloneRelation(org.mmbase.bridge.Node localRelation, org.mmbase.bridge.Node sourceNode, org.mmbase.bridge.Node destinationNode)
           
static void cloneRelations(org.mmbase.bridge.Node localNode, org.mmbase.bridge.Node newNode)
           
static void cloneRelations(org.mmbase.bridge.Node localNode, org.mmbase.bridge.Node newNode, java.lang.String relationName, java.lang.String managerName)
           
protected static boolean isRelation(org.mmbase.bridge.Node node)
          quick test to see if node is a relation by testing fieldnames
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

cloneNodeWithRelations

public static org.mmbase.bridge.Node cloneNodeWithRelations(org.mmbase.bridge.Node localNode)
Clone a node with all relations

Parameters:
localNode - the node to be cloned
Returns:
the cloned copy of localNode

cloneNode

public static org.mmbase.bridge.Node cloneNode(org.mmbase.bridge.Node localNode)
Clone a node to a cloud, including any fields without keeping administrative information

Parameters:
localNode - the node to clone
Returns:
the newly created node in the other cloud

cloneNodeField

public static void cloneNodeField(org.mmbase.bridge.Node sourceNode,
                                  org.mmbase.bridge.Node destinationNode,
                                  org.mmbase.bridge.Field field)
cloneNodeField copies node fields from one node to an other

Parameters:
sourceNode - the source node
destinationNode - destination node
field - the field to clone

cloneRelation

public static org.mmbase.bridge.Node cloneRelation(org.mmbase.bridge.Node localRelation)

cloneRelation

public static org.mmbase.bridge.Node cloneRelation(org.mmbase.bridge.Node localRelation,
                                                   org.mmbase.bridge.Node sourceNode,
                                                   org.mmbase.bridge.Node destinationNode)

cloneRelations

public static void cloneRelations(org.mmbase.bridge.Node localNode,
                                  org.mmbase.bridge.Node newNode)

cloneRelations

public static void cloneRelations(org.mmbase.bridge.Node localNode,
                                  org.mmbase.bridge.Node newNode,
                                  java.lang.String relationName,
                                  java.lang.String managerName)

cloneAliasses

public static void cloneAliasses(org.mmbase.bridge.Node localNode,
                                 org.mmbase.bridge.Node destNode)

isRelation

protected static boolean isRelation(org.mmbase.bridge.Node node)
quick test to see if node is a relation by testing fieldnames

Parameters:
node - Possible relation
Returns:
true when relation fields present


Copyright © 2003-2006 mmapps. All Rights Reserved.