public final class RUtil extends Object
Modifier and Type | Field and Description |
---|---|
static int |
COLUMN_LENGTH_OID
This constant is used for oid column size in database.
|
static int |
COLUMN_LENGTH_QNAME |
static QName |
CUSTOM_OBJECT |
static int |
JDBC_BATCH_SIZE
Currently set in ctx-session.xml as constant, used for batch inserts (e.g.
|
static String |
LOB_STRING_TYPE
This constant is used for mapping type for
Lob
fields. |
static String |
NS_SQL_REPO
This namespace is used for wrapping xml parts of objects during save to
database.
|
static String |
QNAME_DELIMITER |
static String |
SQL_REPO_OBJECT |
Modifier and Type | Method and Description |
---|---|
static String |
computeChecksum(Object... objects) |
static void |
copyResultFromJAXB(ItemDefinition parentDef,
QName itemName,
com.evolveum.midpoint.xml.ns._public.common.common_3.OperationResultType jaxb,
OperationResult repo,
PrismContext prismContext) |
static Element |
createFakeParentElement() |
static OrgFilter |
findOrgFilter(ObjectFilter filter) |
static OrgFilter |
findOrgFilter(ObjectQuery query) |
static void |
fixCompositeIDHandling(org.hibernate.SessionFactory sessionFactory)
This method is used to override "hasIdentifierMapper" in EntityMetaModels
of entities which have composite id and class defined for it.
|
static byte[] |
getByteArrayFromXml(String xml,
boolean compress) |
static String |
getDebugString(RObject object) |
static Integer |
getIntegerFromString(String val) |
static <T extends SchemaEnum> |
getRepoEnumValue(Object object,
Class<T> type) |
static String |
getTableName(Class hqlType) |
static String |
getXmlFromByteArray(byte[] array,
boolean compressed) |
static REmbeddedNamedReference |
jaxbRefToEmbeddedNamedRepoRef(com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectReferenceType jaxb,
PrismContext prismContext) |
static REmbeddedReference |
jaxbRefToEmbeddedRepoRef(com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectReferenceType jaxb,
PrismContext prismContext) |
static RObjectReference |
jaxbRefToRepo(com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectReferenceType reference,
PrismContext prismContext,
RObject owner,
RReferenceOwner refOwner) |
static Set<RPolyString> |
listPolyToSet(List<PolyStringType> list) |
static <T> Set<T> |
listToSet(List<T> list) |
static String |
qnameToString(QName qname) |
static <T extends Objectable> |
revive(Objectable object,
PrismContext prismContext) |
static Set |
safeListReferenceToSet(List<com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectReferenceType> list,
PrismContext prismContext,
RObject owner,
RReferenceOwner refOwner) |
static List<com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectReferenceType> |
safeSetReferencesToList(Set<? extends RObjectReference> set,
PrismContext prismContext) |
static QName |
stringToQName(String text) |
static Integer |
toInteger(Long l) |
static Long |
toLong(Integer i) |
static Long |
toLong(Short s) |
static <T> String |
toRepo(ItemDefinition parentDefinition,
QName itemName,
T value,
PrismContext prismContext) |
static Short |
toShort(Long l) |
public static final int JDBC_BATCH_SIZE
public static final String LOB_STRING_TYPE
Lob
fields. MaterializedClobType
was not working
properly with PostgreSQL, causing TEXT types (clobs) to be saved not in
table row but somewhere else and it always messed up UTF-8 encodingpublic static final int COLUMN_LENGTH_QNAME
public static final String QNAME_DELIMITER
public static final int COLUMN_LENGTH_OID
public static final String NS_SQL_REPO
public static final String SQL_REPO_OBJECT
public static final QName CUSTOM_OBJECT
public static <T extends Objectable> void revive(Objectable object, PrismContext prismContext) throws DtoTranslationException
DtoTranslationException
public static <T> String toRepo(ItemDefinition parentDefinition, QName itemName, T value, PrismContext prismContext) throws SchemaException, JAXBException
SchemaException
JAXBException
public static Element createFakeParentElement()
public static Set<RPolyString> listPolyToSet(List<PolyStringType> list)
public static List<com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectReferenceType> safeSetReferencesToList(Set<? extends RObjectReference> set, PrismContext prismContext)
public static Set safeListReferenceToSet(List<com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectReferenceType> list, PrismContext prismContext, RObject owner, RReferenceOwner refOwner)
public static RObjectReference jaxbRefToRepo(com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectReferenceType reference, PrismContext prismContext, RObject owner, RReferenceOwner refOwner)
public static REmbeddedReference jaxbRefToEmbeddedRepoRef(com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectReferenceType jaxb, PrismContext prismContext)
public static REmbeddedNamedReference jaxbRefToEmbeddedNamedRepoRef(com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectReferenceType jaxb, PrismContext prismContext)
public static void fixCompositeIDHandling(org.hibernate.SessionFactory sessionFactory)
sessionFactory
- public static void copyResultFromJAXB(ItemDefinition parentDef, QName itemName, com.evolveum.midpoint.xml.ns._public.common.common_3.OperationResultType jaxb, OperationResult repo, PrismContext prismContext) throws DtoTranslationException
DtoTranslationException
public static <T extends SchemaEnum> T getRepoEnumValue(Object object, Class<T> type)
public static byte[] getByteArrayFromXml(String xml, boolean compress)
public static String getXmlFromByteArray(byte[] array, boolean compressed)
public static OrgFilter findOrgFilter(ObjectQuery query)
public static OrgFilter findOrgFilter(ObjectFilter filter)
Copyright © 2016 evolveum. All rights reserved.