Class MatchingNamingConvention

  • All Implemented Interfaces:

    public class MatchingNamingConvention
    extends AbstractNamingConvention
    The JPA naming convention where column names match property names and table names match entity names.

    The JPA specification states that the in the case of no annotations the name of the class will be take as the table name and the name of a property will be taken as the name of the column.

    • Constructor Detail

      • MatchingNamingConvention

        public MatchingNamingConvention​(String sequenceFormat)
        Instantiates with a specific format for DB sequences.
        sequenceFormat - the sequence format
    • Method Detail

      • getForeignKey

        public String getForeignKey​(String prefix,
                                    String fkProperty)
        Description copied from interface: NamingConvention
        Return the foreign key column given the local and foreign properties.
        prefix - the local column used to prefix the fk column
        fkProperty - the property name of the foreign key
        the foreign key column