Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## be.ehealth.technicalconnector.idgenerator
Class IdGeneratorFactory

    java.lang.Object
      be.ehealth.technicalconnector.idgenerator.IdGeneratorFactory

    public final class IdGeneratorFactory

extends Object

creates and returns an IdGenerator. The IdGenerators used by the connector can be define in the configuration by using the following structure be.ehealth.technicalconnector.idgenerator.{type}.classname.

By default 2 idgenerators are supported:

- default: a timebased id generator
- uuid: an uuid based id generator
- xsid: an generater that return an xs:id valid id.
- time: a time based unique id generator Used to create `IdGenerator`

  Field Summary
  `static String` | `DEFAULT` Name of the default IdGenerator provided by the connector.
  `static String` | `NANO`
  `static String` | `PROPS_IDGENERATOR_PREFIX` Property prefix for the property
  `static String` | `PROPS_IDGENERATOR_SUFFIX` Property suffix for the property
  `static String` | `TIMEBASED` name of the IdGenerator that generated key based on `System.currentTimeMillis()` and `System.nanoTime()`
  `static String` | `UUID` Name of the `UUID` based IdGenerator.
  `static String` | `XSID` name of the xs:id based IdGenerator.

  Method Summary
  `static IdGenerator` | `getIdGenerator()` returns the default instance of the idGenerator, which uses a datetime generator, suited to create an inputReference for a mycarenet message ( max length 14).
  `static IdGenerator` | `getIdGenerator(String type)`
  `static void` | `invalidateCachedInstance()` Sets the cachedInstance to null
  `static void` | `registerDefaultImplementation(String type, Class<? extends IdGenerator> clazz)`

  Methods inherited from class java.lang.Object
  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  Field Detail

  ### PROPS_IDGENERATOR_PREFIX

      public static final String PROPS_IDGENERATOR_PREFIX

    Property prefix for the property

    See Also:
      Constant Field Values

  ### PROPS_IDGENERATOR_SUFFIX

      public static final String PROPS_IDGENERATOR_SUFFIX

    Property suffix for the property

    See Also:
      Constant Field Values

  ### DEFAULT

      public static final String DEFAULT

    Name of the default IdGenerator provided by the connector.

    See Also:
      Constant Field Values

  ### UUID

      public static final String UUID

    Name of the `UUID` based IdGenerator.

    See Also:
      Constant Field Values

  ### XSID

      public static final String XSID

    name of the xs:id based IdGenerator.

    See Also:
      Constant Field Values

  ### TIMEBASED

      public static final String TIMEBASED

    name of the IdGenerator that generated key based on `System.currentTimeMillis()` and `System.nanoTime()`

    See Also:
      Constant Field Values

  ### NANO

      public static final String NANO

  See Also:
    Constant Field Values

  Method Detail

  ### getIdGenerator

      public static IdGenerator getIdGenerator()
                                        throws TechnicalConnectorException

    returns the default instance of the idGenerator, which uses a datetime generator, suited to create an inputReference for a mycarenet message ( max length 14).

    Returns:
      an instance of IdGenerator
    Throws:
      `TechnicalConnectorException`

  ### getIdGenerator

      public static IdGenerator getIdGenerator(String type)
                                        throws TechnicalConnectorException

    Returns:
      an instance of IdGenerator
    Throws:
      `TechnicalConnectorException`

  ### invalidateCachedInstance

      public static void invalidateCachedInstance()

    Sets the cachedInstance to null

  ### registerDefaultImplementation

      public static void registerDefaultImplementation(String type,
                                                       Class<? extends IdGenerator> clazz)

  Overview | Package | Class | Use | Tree | Deprecated | Index | Help
  PREV CLASS NEXT CLASS | FRAMES NO FRAMES
  SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

  Connector Package PERSDENTIST 3.15.1 API
  Copyright © {inceptionYear}-2018 eHealth. All Rights Reserved.