public class SunCmpMappingsUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static CmpFieldMapping |
findCmpFieldMapping(EntityMapping em,
String fname,
boolean addEmpty)
Find the CmpFieldMapping element with a matching field-name element value
|
static CmrFieldMapping |
findCmrFieldMapping(EntityMapping em,
String fname,
boolean addEmpty)
Find the cmr-field-mapping element for a field in an EntityMapping object
|
protected static List |
findCompatibleBeansWithValue(org.netbeans.modules.schema2beans.BaseBean root,
String propName,
String propVal,
Class type)
A utility for finding beans in a graph of BaseBean objects.
|
static EntityMapping |
findEntityMapping(SunCmpMappings scms,
String bname,
boolean addEmpty)
Find the EntityMapping element that correspond to a bean.
|
static SunCmpMapping |
getFirstSunCmpMapping(SunCmpMappings scms,
boolean addEmpty)
Return the first SunCmpMapping element from the graph.
|
public static SunCmpMapping getFirstSunCmpMapping(SunCmpMappings scms, boolean addEmpty)
scms - The root of a SunCmpMappings object graphaddEmpty - flag to add an empty version of the SunCmpMapping element to the graph if one is
not found.public static EntityMapping findEntityMapping(SunCmpMappings scms, String bname, boolean addEmpty) throws IllegalArgumentException
scms - the root of the SunCmpMappings graphbname - The value of the ejb-name element for a bean in the graphaddEmpty - flag to add an empty version of the EntityMapping element to the graph if one is
not found.IllegalArgumentException - if more than one EntityMapping element has an ejb-name element with the matching
valuepublic static CmrFieldMapping findCmrFieldMapping(EntityMapping em, String fname, boolean addEmpty) throws IllegalArgumentException
em - The root of the searchfname - the name of the fieldaddEmpty - flag to add an empty version of the CmrFieldMapping element to the graph if one is
not found.IllegalArgumentException - If there is more than one cmr-field with a matching cmr-field-name element in
the EntityMapping graph.public static CmpFieldMapping findCmpFieldMapping(EntityMapping em, String fname, boolean addEmpty) throws IllegalArgumentException
em - the root of the searchfname - the value of the field-name elementaddEmpty - flag to add an empty version of the CmpFieldMapping element to the graph if one is
not found.IllegalArgumentException - If there is more than one cmp-field with a matching field-name element in
the EntityMapping graph.protected static List findCompatibleBeansWithValue(org.netbeans.modules.schema2beans.BaseBean root, String propName, String propVal, Class type) throws IllegalArgumentException
root - The root of a searchpropName - The name of the elementpropVal - the value of the elementtype - The expected type of the value to be returned.IllegalArgumentException - If the bean is not part of a complete bean graph.Copyright © 2017. All rights reserved.