@Entity public class RoleName extends Object implements EntityWithId<String>
Modifier and Type | Field and Description |
---|---|
static String |
FIND_ALL
Query name.
|
static int |
MAX_PARAMS
Maximum number of parameters a role name can have.
|
Modifier | Constructor and Description |
---|---|
protected |
RoleName()
Constructor needed for JPA-specific purposes.
|
|
RoleName(String moduleName,
String localName)
Constructs new
RoleName instance specified by given localName . |
|
RoleName(String moduleName,
String localName,
Collection<String> parameterNames)
Constructs new
RoleName instance specified by given localName . |
Modifier and Type | Method and Description |
---|---|
RoleName |
addParameterName(String parameterName)
|
boolean |
containsParameterName(String name)
Returns true if the parameter names contain given name.
|
boolean |
equals(Object obj) |
RoleUnitName |
getFullName(RoleUnitParameter... parameters)
Returns the
RoleUnitName corresponding to this RoleName
for given parameters. |
String |
getId()
Returns the primary key.
|
String |
getLocalName()
Returns the local name of this
RoleName instance. |
String |
getModuleName()
Returns the module name.
|
RoleUnitName |
getName()
Returns the role name.
|
RoleUnitName |
getNameWithParameters()
Returns the role name with all parameter names having null values.
|
Integer |
getParameterIndex(String parameterName)
Returns the index of the given parameter.
|
Map<String,Integer> |
getParameterIndices()
Returns a map of parameter indices.
|
String |
getParameterName(int idx)
Returns the parameter name for the given index.
|
Collection<String> |
getParameterNames()
Returns a set of all the parameter names that belong to this
role name . |
String |
getStringName()
Returns the role name as string (module name + '::' + local name)
|
int |
hashCode() |
String |
toString() |
public static final String FIND_ALL
public static final int MAX_PARAMS
protected RoleName()
public RoleName(String moduleName, String localName)
RoleName
instance specified by given localName
.moduleName
- the role module namelocalName
- the role local nameNullPointerException
- if moduleName
or localName
is nullpublic RoleName(String moduleName, String localName, Collection<String> parameterNames)
RoleName
instance specified by given localName
.moduleName
- the role module namelocalName
- the role local nameparameterNames
- the role parameter namesNullPointerException
- if moduleName
or localName
or parameterNames
is nullpublic RoleUnitName getName()
public String getId()
EntityWithId
getId
in interface EntityWithId<String>
public RoleUnitName getNameWithParameters()
public String getStringName()
public String getModuleName()
public String getLocalName()
RoleName
instance.RoleName
instance.public Collection<String> getParameterNames()
role name
.RoleName
instance.public boolean containsParameterName(String name)
name
- the parameter namepublic RoleName addParameterName(String parameterName)
parameterName
- The name of the parameter name to add to this role name.RoleName
instance.NullPointerException
- (unchecked) If the parameterName
argument is null
.IllegalStateException
- (unchecked) If the parameter name identified by given parameterName
argument already exists in this role name or
the current parameter name count is already
MAX_PARAMS
.public Map<String,Integer> getParameterIndices()
public Integer getParameterIndex(String parameterName)
parameterName
- the parameter namepublic String getParameterName(int idx)
idx
- the parameter indexIndexOutOfBoundsException
- if the given index is out of boundspublic RoleUnitName getFullName(RoleUnitParameter... parameters)
RoleUnitName
corresponding to this RoleName
for given parameters.parameters
- the array of parametersRoleUnitName
corresponding to this RoleName
for given parametersCopyright © 2007-2020 Whitestein Technologies. All Rights Reserved.