|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.sonar.api.database.BaseIdentifiable org.sonar.api.database.model.ResourceModel
public class ResourceModel
Class to map resource with hibernate model
Field Summary | |
---|---|
static int |
DESCRIPTION_COLUMN_SIZE
|
static int |
KEY_SIZE
|
static int |
NAME_COLUMN_SIZE
|
static String |
QUALIFIER_PROJECT_TRUNK
|
static String |
SCOPE_PROJECT
|
Constructor Summary | |
---|---|
ResourceModel()
Default constructor |
|
ResourceModel(String scope,
String key,
String qualifier,
Integer rootId,
String name)
Creates a resource model |
Method Summary | |
---|---|
static ResourceModel |
build(Resource resource)
Maps a resource to a resource model and returns the resource |
Object |
clone()
|
boolean |
equals(Object obj)
|
Integer |
getCopyResourceId()
|
String |
getDescription()
Only available at project level. |
Boolean |
getEnabled()
|
String |
getKey()
|
String |
getLanguageKey()
|
String |
getLongName()
|
String |
getName()
|
ProjectLink |
getProjectLink(String key)
|
List<ProjectLink> |
getProjectLinks()
Only available at project level. |
String |
getQualifier()
|
Integer |
getRootId()
|
RulesProfile |
getRulesProfile()
|
String |
getScope()
|
int |
hashCode()
|
void |
setCopyResourceId(Integer copyResourceId)
|
void |
setDescription(String description)
Sets the resource description, truncated to DESCRIPTION_COLUMN_SIZE |
void |
setEnabled(Boolean enabled)
|
void |
setKey(String key)
|
void |
setLanguageKey(String lang)
|
void |
setLongName(String s)
Sets the long name of the resource, truncated to NAME_COLUMN_SIZE |
void |
setName(String name)
Sets the resource name, truncated to NAME_COLUMN_SIZE |
void |
setProjectLinks(List<ProjectLink> projectLinks)
|
void |
setQualifier(String qualifier)
|
void |
setRootId(Integer rootId)
|
void |
setRulesProfile(RulesProfile rulesProfile)
|
void |
setScope(String scope)
|
String |
toString()
|
Methods inherited from class org.sonar.api.database.BaseIdentifiable |
---|
getId, setId |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String SCOPE_PROJECT
public static final String QUALIFIER_PROJECT_TRUNK
public static final int DESCRIPTION_COLUMN_SIZE
public static final int NAME_COLUMN_SIZE
public static final int KEY_SIZE
Constructor Detail |
---|
public ResourceModel()
public ResourceModel(String scope, String key, String qualifier, Integer rootId, String name)
Creates a resource model
scope
- the scope the rule will apply onkey
- the rule key. This is the name of the resource, including the pathqualifier
- the resource qualifierrootId
- the rootId for the resourcename
- the short name of the resourceMethod Detail |
---|
public List<ProjectLink> getProjectLinks()
public void setProjectLinks(List<ProjectLink> projectLinks)
public ProjectLink getProjectLink(String key)
public String getDescription()
public void setDescription(String description)
public String getName()
public void setName(String name)
public String getLongName()
public void setLongName(String s)
public Boolean getEnabled()
public void setEnabled(Boolean enabled)
public String getScope()
public void setScope(String scope)
public String getKey()
public String getLanguageKey()
public void setLanguageKey(String lang)
public Integer getCopyResourceId()
public void setCopyResourceId(Integer copyResourceId)
public void setKey(String key)
IllegalArgumentException
- if the key is longer than KEY_SIZEpublic Integer getRootId()
public void setRootId(Integer rootId)
public RulesProfile getRulesProfile()
public void setRulesProfile(RulesProfile rulesProfile)
public String getQualifier()
public void setQualifier(String qualifier)
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
public Object clone()
clone
in class Object
public static ResourceModel build(Resource resource)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |