
Public Member Functions | |
| void | addTagNamed (String tagName) |
| void | addTags (boolean clear, Object tags) |
| void | addTags (Object tags) |
| void | clearTags () |
| boolean | equals (Object obj) |
| int | hashCode () |
| boolean | isTaggedWith (String tagName) |
| boolean | isTaggedWithAll (Object tags) |
| boolean | isTaggedWithAny (Object tags) |
| T | item () |
| void | removeTagNamed (String tagName) |
| void | removeTags (Object tags) |
| void | setTags (Object tags) |
| ERTaggableEntity< T > | taggableEntity () |
| NSArray< String > | tagNames () |
| NSArray< ERTag > | tags () |
Static Public Member Functions | |
| static < TextendsERXGenericRecord > ERTaggable< T > | taggable (T eo) |
Protected Member Functions | |
| void | addTag (ERTag tag) |
| ERTaggable (ERTaggableEntity< T > entity, T item) | |
| void | removeTag (ERTag tag) |
Private Attributes | |
| ERTaggableEntity< T > | _entity |
| T | _item |
Typically you would provide a cover method from your EO to an instance of an ERTaggable:
public class Person extends _Person {
...
public ERTaggable<Person> taggable() {
return ERTaggable.taggable(this);
}
}
| <T> | the type of EO that is being wrapped |
| ERTaggable | ( | ERTaggableEntity< T > | entity, | |
| T | item | |||
| ) | [protected] |
Constructs an ERTaggable wrapper.
| entity | the ERTaggableEntity that corresponds to this item's entity | |
| item | the item to wrap |
| void addTag | ( | ERTag | tag | ) | [protected] |
Adds the tag to this item. This is the single method that to override if you need to perform some additional operations.
| tag | the tag to add |
| void addTagNamed | ( | String | tagName | ) |
This method applies tags to the target object, by looking up the corresponding Tag object instances and adding it to the tag collection of the object. If the tag name already exists in the tags table, it just adds a relationship to the existing tag record. If it doesn't exist, it then creates a new Tag record for it.
This is equivalent to addTags(false, tags).
| tagName | the tag name to add |
| void addTags | ( | boolean | clear, | |
| Object | tags | |||
| ) |
This method applies tags to the target object, by parsing the tags parameter into Tag object instances and adding them to the tag collection of the object. If the tag name already exists in the tags table, it just adds a relationship to the existing tag record. If it doesn't exist, it then creates a new Tag record for it.
| tags | the tags to add (String to tokenize, NSArray<String>, etc) | |
| clear | if true, existing tags will be removed first |
| void addTags | ( | Object | tags | ) |
This method applies tags to the target object, by parsing the tags parameter into Tag object instances and adding them to the tag collection of the object. If the tag name already exists in the tags table, it just adds a relationship to the existing tag record. If it doesn't exist, it then creates a new Tag record for it.
This is equivalent to addTags(false, tags).
| tags | the tags to add (String to tokenize, NSArray<String>, etc) |
| void clearTags | ( | ) |
Removes all of the tags associated with this item.
| boolean equals | ( | Object | obj | ) |
| int hashCode | ( | ) |
| boolean isTaggedWith | ( | String | tagName | ) |
Checks to see if this object has been tagged with the given tag name.
| tagName | the tag name to check |
| boolean isTaggedWithAll | ( | Object | tags | ) |
Checks to see if this object has been tagged with all the given tags.
| tags | the tags to add (String to tokenize, NSArray<String>, etc) |
| boolean isTaggedWithAny | ( | Object | tags | ) |
Checks to see if this object has been tagged with any of the given tags.
| tags | the tags to add (String to tokenize, NSArray<String>, etc) |
| T item | ( | ) |
| void removeTag | ( | ERTag | tag | ) | [protected] |
Removes the tag from this item. This is the single method that to override if you need to perform some additional operations.
| tag | the tag to remove |
| void removeTagNamed | ( | String | tagName | ) |
This method removes tags from the target object, by looking up the corresponding Tag object instances and removing them from the tag collection of the object if they exist.
| tagName | the tag to remove (String to tokenize, NSArray<String>, etc) |
| void removeTags | ( | Object | tags | ) |
This method removes tags from the target object, by parsing the tags parameter into Tag object instances and removing them from the tag collection of the object if they exist.
| tags | the tags to remove (String to tokenize, NSArray<String>, etc) |
| void setTags | ( | Object | tags | ) |
Clears the current tags collection and sets the tag names for this object. Equivalent of calling addTags(tags, true).
| tags | the tags to add (String to tokenize, NSArray<String>, etc) |
| static <TextendsERXGenericRecord> ERTaggable<T> taggable | ( | T | eo | ) | [static] |
| ERTaggableEntity<T> taggableEntity | ( | ) |
| NSArray<String> tagNames | ( | ) |
Returns an array of strings containing the tag names applied to this object.
| NSArray<ERTag> tags | ( | ) |
Returns an array of ERTags associated with this item.
ERTaggableEntity<T> _entity [private] |
T _item [private] |
1.5.8