public class Utils extends FrameworkBaseObject
Modifier and Type | Field and Description |
---|---|
static String |
PK_SUFFIX |
static String |
SPACES |
serialVersionUID
Constructor and Description |
---|
Utils()
default constructor
|
Modifier and Type | Method and Description |
---|---|
static String |
buildName(String parentName,
String childName)
Builds a name using the format parentName.childName
|
static String |
capitalizeFirstLetter(String target)
Capitalizes the first letter.
|
static String |
convertType(String type)
Each supported model has slight variances on the types declared and
supported.
|
static String |
convertTypeForGoogleAppEngine(String type)
Deprecated.
|
static String |
convertTypeForHibernate(String type)
Special handler to coerce data types to what Hibernate can handle.
|
static String |
getTypeAsXMLType(String type)
Standard java types converted XML Types
|
static Collection<String> |
getValidDataTypes()
The Collection of supported data types.
|
static String[] |
getValidDataTypesAsArray()
Returns the Collection of valid data types as an array
|
static String |
lowercaseFirstLetter(String target)
Forces the first letter to be lowercase.
|
static String |
mapTypeToDotNetType(String type)
Maps a Harbormaster Meta-model type to a Dot Net type...should be moved to a Velocity macro
|
static String |
noWhiteSpace(String src)
Removes all whitespace
|
static String |
noWhiteSpaceNoDots(String src)
Removes white space and periods as in dot notation and returns the result
|
static String |
reconcileType(String type)
Handles converting type and capitalizing its 1st letter
|
static String |
removeSpaces(String sourceString)
Remove spaces
|
static String |
turnIntoPhrase(String value)
Turns a String into a phrase.
|
static void |
writeXmlToFile(String xml,
File tmpLocalModelFile)
Write the XML content to the provided file
|
logDebugMessage, logErrorMessage, logInfoMessage, logMessage, logWarnMessage
public static final String SPACES
public static final String PK_SUFFIX
public static String noWhiteSpaceNoDots(String src)
src
- source to processpublic static String noWhiteSpace(String src)
src
- source to processpublic static String lowercaseFirstLetter(String target)
target
- target to processpublic static String capitalizeFirstLetter(String target)
target
- target to processpublic static String convertTypeForGoogleAppEngine(String type)
type
- data typepublic static String convertTypeForHibernate(String type)
type
- target to convertpublic static String convertType(String type)
type
- target to convertpublic static String reconcileType(String type)
type
- source to reconcilepublic static String getTypeAsXMLType(String type)
type
- to transformpublic static String turnIntoPhrase(String value)
value
- source to processpublic static String buildName(String parentName, String childName)
parentName
- parent namechildName
- child namepublic static Collection<String> getValidDataTypes()
public static String[] getValidDataTypesAsArray()
public static String removeSpaces(String sourceString)
sourceString
- source to processpublic static void writeXmlToFile(String xml, File tmpLocalModelFile) throws IOException
xml
- what to outputtmpLocalModelFile
- file to output toIOException
Copyright © 2021. All rights reserved.