Class ForeignGenerator

    • Constructor Detail

      • ForeignGenerator

        public ForeignGenerator()
    • Method Detail

      • getEntityName

        public java.lang.String getEntityName()
        Getter for property 'entityName'.
        Returns:
        Value for property 'entityName'.
      • getPropertyName

        public java.lang.String getPropertyName()
        Getter for property 'propertyName'.
        Returns:
        Value for property 'propertyName'.
      • getRole

        public java.lang.String getRole()
        Getter for property 'role'. Role is the property name qualified by the entity name.
        Returns:
        Value for property 'role'.
      • configure

        public void configure​(Type type,
                              java.util.Properties params,
                              ServiceRegistry serviceRegistry)
                       throws MappingException
        Description copied from interface: Configurable
        Configure this instance, given the value of parameters specified by the user as <param> elements. This method is called just once, following instantiation.
        Specified by:
        configure in interface Configurable
        Parameters:
        type - The id property type descriptor
        params - param values, keyed by parameter name
        serviceRegistry - Access to service that may be needed.
        Throws:
        MappingException
      • generate

        public java.io.Serializable generate​(SharedSessionContractImplementor sessionImplementor,
                                             java.lang.Object object)
        Description copied from interface: IdentifierGenerator
        Generate a new identifier.
        Specified by:
        generate in interface IdentifierGenerator
        Parameters:
        sessionImplementor - The session from which the request originates
        object - the entity or collection (idbag) for which the id is being generated
        Returns:
        a new identifier