@Platform(value="linux") @Platform(value="windows") public abstract class EntityWithSources extends EntityWithMetadata
Constructor and Description |
---|
EntityWithSources() |
Modifier and Type | Method and Description |
---|---|
abstract void |
addSource(Source source)
Associate a new source with the entity.
|
abstract void |
addSource(String id)
Associate a new source with the entity.
|
abstract Source |
getSource(long index)
Retrieves an associated source identified by its index.
|
abstract Source |
getSource(String id)
Returns an associated source identified by its id.
|
abstract long |
getSourceCount()
Get the number of sources associated with this entity.
|
abstract List<Source> |
getSources()
Get all sources associated with this entity.
|
abstract boolean |
hasSource(Source source)
Checks if a specific source is associated with this entity.
|
abstract boolean |
hasSource(String id)
Checks if a specific source is associated with this entity.
|
abstract boolean |
removeSource(Source source)
Remove a source from the list of associated sources.
|
abstract boolean |
removeSource(String id)
Remove a source from the list of associated sources.
|
abstract void |
setSources(List<Source> sources)
Set all sources associations for this entity.
|
getMetadata, removeMetadata, setMetadata, setMetadata
compareTo, getDefinition, getName, getType, setDefinition, setType
equals, forceCreatedAt, forceUpdatedAt, getCreatedAt, getId, getUpdatedAt, hashCode, setCreatedAt, setUpdatedAt
isInitialized, isNone
public abstract long getSourceCount()
public abstract boolean hasSource(String id)
id
- The source id to check.public abstract boolean hasSource(Source source)
source
- The source to check.public abstract Source getSource(String id)
id
- The id of the associated source.public abstract Source getSource(long index)
index
- The index of the associated source.public abstract List<Source> getSources()
public abstract void setSources(List<Source> sources)
sources
- A vector with all sources.public abstract void addSource(String id)
id
- The id of the source.public abstract void addSource(Source source)
source
- The source to add.public abstract boolean removeSource(String id)
id
- The id of the source to remove.public abstract boolean removeSource(Source source)
source
- The source to remove.Copyright © 2016. All rights reserved.