Module: CaTissue::Annotation::Proxy

Defined in:
lib/catissue/annotation/proxy.rb

Overview

Resource annotation hook proxy mix-in.

Instance Method Summary collapse

Instance Method Details

#ensure_identifier_reflects_hookObject

Sets the id Java property to the hook identifier. This method must be called before saving an annotation that references this proxy.



20
21
22
23
24
25
# File 'lib/catissue/annotation/proxy.rb', line 20

def ensure_identifier_reflects_hook
  if getId.nil? then
    setId(hook.identifier)
    logger.debug { "Set annotation proxy #{self} identifier to that of the hook entity #{hook.qp}." }
  end
end

#identifierInteger

The hook proxy identifier is the hook identifier. This method delegates to the hook.

Returns:

  • (Integer)

    the hook identifier



9
10
11
# File 'lib/catissue/annotation/proxy.rb', line 9

def identifier
  hook.identifier if hook
end

#identifier=(value) ⇒ Object

The hook proxy identifier cannot be set directly. Assignment is a no-op.

Parameters:

  • value (Integer)

    the (ignored) identifier value



16
# File 'lib/catissue/annotation/proxy.rb', line 16

def identifier=(value); end