|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.scooterframework.orm.activerecord.tag.TagHelper
public class TagHelper
TagHelper has helper methods related to tags.
| Constructor Summary | |
|---|---|
TagHelper()
|
|
| Method Summary | |
|---|---|
static void |
addTags(java.lang.String tags)
Adds tags to tags table. |
static java.util.Set<java.lang.String> |
allTags()
Returns all tag names. |
static java.util.Set<java.lang.String> |
allTags(ActiveRecord record)
Returns a set of tag names associated with a record instance. |
static java.util.List<ActiveRecord> |
findOrCreateTagRecords(java.lang.String tags)
Returns all tag records as specified by the tags. |
static java.util.List<ActiveRecord> |
findRecordsTaggedWith(java.lang.String tags)
Returns records tagged with tags. |
static java.util.List<ActiveRecord> |
findRecordsTaggedWith(java.lang.String type,
java.lang.String tags)
Returns records of a certain type that are tagged with tags. |
static java.util.List<ActiveRecord> |
findTagRecords(java.lang.String tags)
Returns all tag records as specified by the tags. |
static void |
registerTaggables(java.lang.Class<? extends ActiveRecord>[] targets)
Registers record types that can be treated as taggable. |
static void |
removeRecordTags(ActiveRecord record,
java.lang.String tags)
Removes all tag records as specified by the tags string for a record. |
static void |
removeTags(java.lang.String tags)
Removes all tag records as specified by the tags string. |
static int |
tagsCount(ActiveRecord record)
Returns a count of all tag names associated with a record instance. |
static AssociatedRecords |
tagWith(ActiveRecord record,
java.lang.String tags)
Adds tags to a record. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TagHelper()
| Method Detail |
|---|
public static java.util.Set<java.lang.String> allTags()
public static void addTags(java.lang.String tags)
tags - the tags stringpublic static void registerTaggables(java.lang.Class<? extends ActiveRecord>[] targets)
targets - specific types that act as taggable.public static java.util.Set<java.lang.String> allTags(ActiveRecord record)
record -
public static int tagsCount(ActiveRecord record)
record -
public static AssociatedRecords tagWith(ActiveRecord record,
java.lang.String tags)
java, j2ee, jdbc,...
or java|j2ee|jdbc|...
or java&j2ee&jdbc&...
record - the record to be taggedtags - a string of tags separated by comma
public static java.util.List<ActiveRecord> findTagRecords(java.lang.String tags)
tags - the tags string
public static java.util.List<ActiveRecord> findOrCreateTagRecords(java.lang.String tags)
tags - the tags string
public static java.util.List<ActiveRecord> findRecordsTaggedWith(java.lang.String tags)
tags - the tags condition
public static java.util.List<ActiveRecord> findRecordsTaggedWith(java.lang.String type,
java.lang.String tags)
type - the specific record typetags - the tags condition
public static void removeTags(java.lang.String tags)
tags - the tags string
public static void removeRecordTags(ActiveRecord record,
java.lang.String tags)
tags - the tags string
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||