public abstract class AbstractMultiLingual extends Object implements Comparable<AbstractMultiLingual>
Modifier and Type | Field and Description |
---|---|
static int |
EXTERNAL_LANGUAGE_SIZE |
static int |
INTERNAL_LANGUAGE_SIZE |
protected static String[] |
ML_EMPTY_VALUES |
protected static String[] |
ML_EMPTY_VALUES_EXTERNAL |
protected static List<String> |
ML_VALUES_DEFAULT |
protected static List<String> |
ML_VALUES_DEFAULT_EXTERNAL |
protected List<String> |
mlValues
Persisted object representing all the translations.
|
protected boolean |
withValidation |
Constructor and Description |
---|
AbstractMultiLingual() |
AbstractMultiLingual(AbstractMultiLingual ml) |
AbstractMultiLingual(AbstractMultiLingual ml,
boolean isInternal) |
AbstractMultiLingual(boolean isInternal) |
AbstractMultiLingual(String[] trans) |
AbstractMultiLingual(String[] trans,
boolean isInternal) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(AbstractMultiLingual o) |
boolean |
equals(Object obj) |
String |
getAtPosition(int pos) |
String |
getTranslation1()
DO NOT use this method.
|
String |
getTranslation2()
DO NOT use this method.
|
String |
getTranslation3()
DO NOT use this method.
|
String |
getTranslation4()
DO NOT use this method.
|
String |
getTranslation5()
DO NOT use this method.
|
List<String> |
getTranslations()
This is the ONLY method that should be used to get translations.
|
int |
hashCode() |
boolean |
hasText() |
void |
setAtPosition(String translation,
int pos) |
void |
setTranslation1(String t) |
void |
setTranslation2(String t) |
void |
setTranslation3(String t) |
void |
setTranslation4(String t) |
void |
setTranslation5(String t) |
void |
setTranslations(List<String> mlValues) |
void |
setValidation(boolean withValidation)
Defines if the validation occurs or not on this object.
|
String |
toString() |
boolean |
validateDefaultLanguageNotEmpty()
Validates that the content of the default language is not empty.
|
public static final int INTERNAL_LANGUAGE_SIZE
public static final int EXTERNAL_LANGUAGE_SIZE
protected static final String[] ML_EMPTY_VALUES
protected static final String[] ML_EMPTY_VALUES_EXTERNAL
protected List<String> mlValues
protected boolean withValidation
public AbstractMultiLingual()
public AbstractMultiLingual(boolean isInternal)
public AbstractMultiLingual(String[] trans)
public AbstractMultiLingual(AbstractMultiLingual ml)
public AbstractMultiLingual(String[] trans, boolean isInternal)
public AbstractMultiLingual(AbstractMultiLingual ml, boolean isInternal)
public List<String> getTranslations()
public String getAtPosition(int pos)
public void setAtPosition(String translation, int pos)
public String getTranslation1()
public void setTranslation1(String t)
public String getTranslation2()
public void setTranslation2(String t)
public String getTranslation3()
public void setTranslation3(String t)
public String getTranslation4()
public void setTranslation4(String t)
public String getTranslation5()
public void setTranslation5(String t)
public void setValidation(boolean withValidation)
public boolean validateDefaultLanguageNotEmpty()
setValidation(boolean)
with false
.public boolean hasText()
public int compareTo(AbstractMultiLingual o)
compareTo
in interface Comparable<AbstractMultiLingual>
Copyright © 2021. All rights reserved.