Class DefaultConstraintMaxLength
- java.lang.Object
-
- io.ebeaninternal.dbmigration.ddlgeneration.platform.DefaultConstraintMaxLength
-
- All Implemented Interfaces:
DbConstraintNaming.MaxLength
public class DefaultConstraintMaxLength extends Object implements DbConstraintNaming.MaxLength
Default implementation used to truncate or shorten db constraint names as required.
-
-
Constructor Summary
Constructors Constructor Description DefaultConstraintMaxLength(int maxConstraintNameLength)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
maxLength(String constraintName, int count)
Apply a maximum length to the constraint name.
-
-
-
Constructor Detail
-
DefaultConstraintMaxLength
public DefaultConstraintMaxLength(int maxConstraintNameLength)
-
-
Method Detail
-
maxLength
public String maxLength(String constraintName, int count)
Apply a maximum length to the constraint name.This implementation should work well apart from perhaps DB2 where the limit is 18.
- Specified by:
maxLength
in interfaceDbConstraintNaming.MaxLength
-
-