public class SpringUtils extends Object
| Constructor and Description |
|---|
SpringUtils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
concatNamesCamelCase(Collection<String> names)
Takes the given
names and concatenates them in camel case
form. |
List<ModelElementFacade> |
filterUniqueByName(Collection<ModelElementFacade> modelElements)
Returns an ordered set containing the argument model elements, model elements with a name that is already
used by another model element in the argument collection will not be returned.
|
String |
formatHibernateQueryParameterValue(ClassifierFacade type,
String value)
Formats the given type to the appropriate Hibernate query parameter value.
|
Collection<Role> |
getAllRoles(Collection<Service> services)
Retrieves all roles from the given
services collection. |
String |
getClassName(String fullyQualifiedName)
Returns the class name part of a fully qualified name
|
static String |
getDate()
Returns the current Date in the specified format.
|
static String |
getDate(String format)
Returns the current Date in the specified format.
|
static String |
getFullyQualifiedClassName(String packageName,
String name)
Constructs the fully qualified class name from the packageName and name.
|
String |
getPackageName(String fullyQualifiedName)
Returns the package name part of a fully qualified name
|
static List<String> |
getRooClass(ClassifierFacade facade)
Constructs the fully qualified class definition from the facade.
|
static List<String> |
getRooEntity(Entity entity,
String recordType)
Constructs the fully qualified class name from the packageName and name.
|
static String |
getRooEntityName(Entity entity)
Constructs the fully qualified class name from the packageName and name.
|
static List<String> |
getRooEnum(EnumerationFacade facade)
Constructs the fully qualified class definition from the facade.
|
static String |
getRooField(ModelElementFacade facade)
Constructs the fully qualified class name from the packageName and name.
|
String |
getSpringPropertyValue(String value)
Based on the given
value, this method will return
a formatted Spring property (including the handling of 'null'). |
boolean |
isRichClient()
Returns TRUE if code is being generated for a rich client environment
|
boolean |
lingoRemotableServicesPresent(Collection<Service> services)
Indicates if any remotable services using Lingo are present.
|
boolean |
localEjbsPresent(Collection<Service> services)
Indicates if any local EJBs are present in the collection
of services.
|
boolean |
privateServicesPresent(Collection<Service> services)
Indicates if any private services are present.
|
boolean |
publicServicesPresent(Collection<Service> services)
Indicates if any public (non private) services are present.
|
boolean |
remotableServicesPresent(Collection<Service> services)
Indicates if any Spring remotable services are present.
|
boolean |
remoteEjbsPresent(Collection<Service> services)
Indicates if any remote EJBs are present in the collection
of services.
|
String |
removeGenerics(String parameter)
Removes generics from string.
|
void |
setRichClient(boolean richClientProperty)
Sets if code is being generated for a rich client.
|
public SpringUtils()
public Collection<Role> getAllRoles(Collection<Service> services)
services collection.services - the collection services.public boolean remoteEjbsPresent(Collection<Service> services)
services - the collection of services to check.public boolean localEjbsPresent(Collection<Service> services)
services - the collection of services to check.public boolean remotableServicesPresent(Collection<Service> services)
services - the collection of services to check.public boolean lingoRemotableServicesPresent(Collection<Service> services)
services - the collection of services to check.public boolean privateServicesPresent(Collection<Service> services)
services - the collection of services to check.public boolean publicServicesPresent(Collection<Service> services)
services - the collection of services to check.public String getSpringPropertyValue(String value)
value, this method will return
a formatted Spring property (including the handling of 'null').value - the value from which to create the spring value.public String removeGenerics(String parameter)
parameter - String containing genericspublic void setRichClient(boolean richClientProperty)
richClientProperty - public boolean isRichClient()
public String getClassName(String fullyQualifiedName)
fullyQualifiedName - public String getPackageName(String fullyQualifiedName)
fullyQualifiedName - public List<ModelElementFacade> filterUniqueByName(Collection<ModelElementFacade> modelElements)
modelElements - a collection of model elements, elements that are not model elements will be ignoredpublic String formatHibernateQueryParameterValue(ClassifierFacade type, String value)
type - the type of the Hibernate query parameter.value - the current value to format.public static String concatNamesCamelCase(Collection<String> names)
names and concatenates them in camel case
form.names - the names to concatenate.public static String getFullyQualifiedClassName(String packageName, String name)
packageName - the package name to which the class belongs.name - the name of the class.public static List<String> getRooEnum(EnumerationFacade facade)
facade - the class to construct the roo field definition.public static List<String> getRooClass(ClassifierFacade facade)
facade - the class to construct the roo field definition.public static String getRooEntityName(Entity entity)
entity - the entity to construct the roo script definition.public static List<String> getRooEntity(Entity entity, String recordType)
entity - the entity to construct the roo script definition.recordType - Either 'dao' or 'repository'public static String getRooField(ModelElementFacade facade)
facade - the property (attribute or associationEnd) to construct the roo field definition.public static String getDate(String format)
format - The format for the output dateCopyright © 2003–2014 AndroMDA.org. All rights reserved.