DatabaseUtils#
- public class DatabaseUtils#
Methods#
bytes2UTF8#
deriveStage1Inserts#
- public static int deriveStage1Inserts(List<Property> stage1Inserts, EntityInterface e)#
Apply the processPropertiesStage1 to all properties of this entity and possibly to this entity itself (if it has a value)
Populate the stage1Inserts list with all properties that are non-leaf nodes in the tree of properties or that are direct properties of the entity.
- Returns:
The number of replacements.
deriveStage2Inserts#
parseEntityResultSet#
- public static SparseEntity parseEntityResultSet(ResultSet rs)#
Helper function for parsing MySQL results.
This function creates SparseEntities and parses all fields which belong to a SparseEntity: id, name, role, acl, description, datatype, and the file properties.
Never returns null.
parseFromProtoProperties#
- public static ArrayList<Property> parseFromProtoProperties(EntityInterface entity, List<ProtoProperty> protos)#
parseNameRoleACL#
- public static SparseEntity parseNameRoleACL(ResultSet rs)#
Helper function for parsing MySQL results.
This function creates SparseEntities and parses only the name, the role and the acl of an entity.
Never returns null.
parseOverrides#
- public static void parseOverrides(List<ProtoProperty> properties, ResultSet rs)#
parseParentResultSet#
- public static LinkedList<VerySparseEntity> parseParentResultSet(ResultSet rs)#
parsePropertyResultset#
- public static List<ProtoProperty> parsePropertyResultset(ResultSet rs)#
transformToDeepPropertyTree#
- public static LinkedList<ProtoProperty> transformToDeepPropertyTree(List<ProtoProperty> properties, boolean isHead)#