public final class AtlassianTableNameConverter extends Object implements TableNameConverter
This is the table name converter used by the Active Objects plugin. It works according to the following:
entity interface is annotated with Table then the value
of the annotation is used as the base for naming.simple class name is used.
MyEntity becomes
MY_ENTITY.prefix is then applied, using its prepend method.This means that if you refactor your entities and don't want to have to upgrade the database tables used behind
the scene, you can use the Table annotation to your advantage. For example, one could
refactor the following entity:
public interface MyEntity {}
to
@Table("MyEntity")
public interface YourEntity {}
| Constructor and Description |
|---|
AtlassianTableNameConverter(TablePrefix prefix) |
| Modifier and Type | Method and Description |
|---|---|
String |
getName(Class<? extends RawEntity<?>> entityClass)
Generates a table name to correspond with the specified class.
|
public AtlassianTableNameConverter(TablePrefix prefix)
public String getName(Class<? extends RawEntity<?>> entityClass)
TableNameConverterTable
annotation and use the appropriate override when necessary. If this
check is not made, ActiveObjects will continue to function normally,
but any code assuming the proper imlementation of @Table
will likely fail.getName in interface TableNameConverterentityClass - The entity type for which a corresponding field name must be
generated.Copyright © 2007–2021 Atlassian. All rights reserved.