public class XMLHelper extends Object
Modifier | Constructor and Description |
---|---|
protected |
XMLHelper(Document document,
ClassLoader loader)
INTERNAL:
|
|
XMLHelper(Document document,
String fileName,
ClassLoader loader)
INTERNAL:
|
Modifier and Type | Method and Description |
---|---|
List<String> |
getCascadeTypes(Node node)
INTERNAL:
|
Class |
getClassForName(String className)
INTERNAL:
|
Class |
getClassForNode(Node node)
INTERNAL:
Return the Class for a given node.
|
ClassLoader |
getClassLoader()
INTERNAL:
Get the loader.
|
String |
getClassNameForNode(Node node)
INTERNAL:
Return the fully qualified class name for a given node.
|
Document |
getDocument()
INTERNAL:
Return the instance document associated with this helper.
|
String |
getDocumentName()
INTERNAL:
Return the instance document name associated with this helper.
|
String |
getFetchTypeDefaultEAGER(Node node)
INTERNAL:
|
String |
getFetchTypeDefaultLAZY(Node node)
INTERNAL:
|
String |
getFullyQualifiedClassName(String className)
INTERNAL:
This convenience method will attempt to fully qualify a class name if
required.
|
static String |
getFullyQualifiedClassName(String className,
String packageName)
INTERNAL:
This convenience method will attempt to fully qualify a class name if
required.
|
String |
getLoggingContextForDefaultMappingReferenceClass(Node mappingNode)
INTERNAL:
This convenience method determines the type of relationship mapping the
node represents, and returns the appropriate logging context.
|
String |
getMappedBy(Node node)
INTERNAL:
|
Node |
getNode(Node node,
String xPath)
INTERNAL:
Get a node off the given node.
|
Node |
getNode(Node node,
String[] xPath)
INTERNAL:
Get a node off the given node.
|
Node |
getNode(String[] xPath)
INTERNAL:
Get a node off the document node.
|
NodeList |
getNodes(Node node,
String xPath)
INTERNAL:
|
NodeList |
getNodes(Node node,
String[] xPath)
INTERNAL:
|
NodeList |
getNodes(Node node,
String xPath1,
String xPath2)
INTERNAL:
|
NodeList |
getNodes(String[] xPath)
INTERNAL:
Get the nodes off the given node.
|
NodeList |
getNodes(String xPath1,
String xPath2)
INTERNAL:
Get the nodes off the given node.
|
String |
getNodeTextValue(Node node,
String xPath)
INTERNAL:
|
String |
getNodeTextValue(String xPath1,
String xPath2)
INTERNAL:
|
String |
getNodeTextValue(String xPath1,
String xPath2,
String defaultValue)
INTERNAL:
|
String |
getNodeValue(Node node,
String xPath)
INTERNAL:
|
String |
getNodeValue(Node node,
String[] xPath)
INTERNAL:
|
boolean |
getNodeValue(Node node,
String[] xPath,
boolean defaultValue)
INTERNAL:
|
Class |
getNodeValue(Node node,
String[] xPath,
Class defaultValue)
INTERNAL:
|
int |
getNodeValue(Node node,
String[] xPath,
int defaultValue)
INTERNAL:
|
String |
getNodeValue(Node node,
String[] xPath,
String defaultValue)
INTERNAL:
|
boolean |
getNodeValue(Node node,
String xPath,
boolean defaultValue)
INTERNAL:
|
Class |
getNodeValue(Node node,
String xPath,
Class defaultValue)
INTERNAL:
|
int |
getNodeValue(Node node,
String xPath,
int defaultValue)
INTERNAL:
|
String |
getNodeValue(Node node,
String xPath,
String defaultValue)
INTERNAL:
|
String |
getNodeValue(String[] xPath)
INTERNAL:
|
int |
getNodeValue(String[] xPath,
int defaultValue)
INTERNAL:
|
String |
getNodeValue(String[] xPath,
String defaultValue)
INTERNAL:
|
String |
getPackage()
INTERNAL:
|
Class |
getTargetEntity(Node node)
INTERNAL:
|
NodeList |
getTextColumnNodes(Node node)
INTERNAL:
|
boolean |
hasNode(Node node,
String xPath)
INTERNAL:
|
boolean |
isOptional(Node node)
INTERNAL:
|
Node |
locateEmbeddableNode(Class cls)
INTERNAL:
Locate a node in the DOM tree for a given class.
|
Node |
locateEntityNode(Class cls)
INTERNAL:
Locate a node in the DOM tree for a given class.
|
Node |
locateMappedSuperclassNode(Class cls)
INTERNAL:
Locate a node in the DOM tree for a given class.
|
Node |
locateNode(Class cls)
INTERNAL:
Locate a node in the DOM tree for the given class.
|
Node |
locateNodeForAttribute(Node node,
String attributeName)
INTERNAL:
Locate a node in the DOM tree for a given attribute name.
|
Class |
locateRootEntity(Class entityClass)
INTERNAL:
Return the root entity in an entity class hierarchy
|
boolean |
nodeHasJoinColumns(Node node)
INTERNAL:
Indicates if a given node has a primary-key-join-column sub-element.
|
boolean |
nodeHasPrimaryKeyJoinColumns(Node node)
INTERNAL:
Indicates if a given node has a primary-key-join-column sub-element.
|
static Document |
parseDocument(InputStream xmlDocumentInputStream,
String documentName,
ClassLoader loader)
INTERNAL:
Build a DOM from an instance document using the provided URL.
|
void |
setLoader(ClassLoader loader)
INTERNAL:
Update the loader after it changes.
|
protected XMLHelper(Document document, ClassLoader loader)
public XMLHelper(Document document, String fileName, ClassLoader loader)
public Class getClassForNode(Node node)
public String getClassNameForNode(Node node)
public Document getDocument()
public String getDocumentName()
public String getFullyQualifiedClassName(String className)
public static String getFullyQualifiedClassName(String className, String packageName)
public String getLoggingContextForDefaultMappingReferenceClass(Node mappingNode)
public NodeList getNodes(String xPath1, String xPath2)
public String getNodeTextValue(String xPath1, String xPath2, String defaultValue)
public int getNodeValue(String[] xPath, int defaultValue)
public String getPackage()
public boolean isOptional(Node node)
public Node locateEmbeddableNode(Class cls)
public Node locateEntityNode(Class cls)
public Node locateMappedSuperclassNode(Class cls)
public Node locateNode(Class cls)
public Node locateNodeForAttribute(Node node, String attributeName)
public Class locateRootEntity(Class entityClass)
public boolean nodeHasPrimaryKeyJoinColumns(Node node)
public boolean nodeHasJoinColumns(Node node)
public static Document parseDocument(InputStream xmlDocumentInputStream, String documentName, ClassLoader loader)
public void setLoader(ClassLoader loader)
public ClassLoader getClassLoader()
Copyright © 2024. All rights reserved.