AnnotationfindProjectSpecificAnnotation(Annotation defaultAnnotation,
int projectId)
Find a project-specific annotation for a given default annotation.
primaryCreated
voidprimaryCreated(int id,
int annotationSet,
int annotationType,
int project)
A PRIMARY annotation has been created in this transaction.
If this is a DEFAULT annotation (projectId==0) we need to set
"override_id" for project-specific annotations to point to this annotation.
If this is a PROJECT-SPECIFIC annotation (projectId!=0) we
need to find the ID of the default annotation.
Parameters:
id - The annotation that was created
annotationSet - The annotation set the annotation belongs to
annotationType - The annotation type of the annotation
project - The id of the project, or 0 for default annotation
inheritedCreated
voidinheritedCreated(int id,
int annotationSet,
int parent,
int parentSet,
int parentOverride,
int project)
An INHERITED/CLONED annotation has been created in this transaction.
If this is a DEFAULT annotation (projectId==0) we need to set
"override_id" for project-specific annotations to point to this annotation.
If this is a PROJECT-SPECIFIC annotation (projectId!=0) we
need to find the ID of the default annotation.
Parameters:
id - The annotation that was created
annotationSet - The annotation set the annotation belongs to
parent - The id of the parent annotation
parentSet - The id of the parent annotation set
parentOverride - The "override_id" column from the parent annotation
project - The id of the project, or 0 for default annotation
defaultDeleted
voiddefaultDeleted(int id,
boolean isPrimary)
A default annotation is being deleted in this transaction.
We need to set override_id=0 on all other annotations that are
referencing this annotation. This method can be used for both
primary, inherited and cloned annotations.
Called after a successful commit. Implementations should not throw any
exceptions from this method. If they do, the message is logged, by no
other action is taken.
Called after an unsuccessful commit. Implementations should not throw any
exceptions from this method. If they do, the message is logged, by no
other action is taken.