use of com.liferay.blade.samples.dspservicebuilder.model.Country in project liferay-blade-samples by liferay.
the class CountryModelImpl method equals.
@Override
public boolean equals(Object object) {
if (this == object) {
return true;
}
if (!(object instanceof Country)) {
return false;
}
Country country = (Country) object;
long primaryKey = country.getPrimaryKey();
if (getPrimaryKey() == primaryKey) {
return true;
} else {
return false;
}
}
use of com.liferay.blade.samples.dspservicebuilder.model.Country in project liferay-blade-samples by liferay.
the class CountryModelImpl method toXmlString.
@Override
public String toXmlString() {
Map<String, Function<Country, Object>> attributeGetterFunctions = getAttributeGetterFunctions();
StringBundler sb = new StringBundler(5 * attributeGetterFunctions.size() + 4);
sb.append("<model><model-name>");
sb.append(getModelClassName());
sb.append("</model-name>");
for (Map.Entry<String, Function<Country, Object>> entry : attributeGetterFunctions.entrySet()) {
String attributeName = entry.getKey();
Function<Country, Object> attributeGetterFunction = entry.getValue();
sb.append("<column><column-name>");
sb.append(attributeName);
sb.append("</column-name><column-value><![CDATA[");
sb.append(attributeGetterFunction.apply((Country) this));
sb.append("]]></column-value></column>");
}
sb.append("</model>");
return sb.toString();
}
use of com.liferay.blade.samples.dspservicebuilder.model.Country in project liferay-blade-samples by liferay.
the class CountryPersistenceImpl method create.
/**
* Creates a new country with the primary key. Does not add the country to the database.
*
* @param countryId the primary key for the new country
* @return the new country
*/
@Override
public Country create(long countryId) {
Country country = new CountryImpl();
country.setNew(true);
country.setPrimaryKey(countryId);
return country;
}
use of com.liferay.blade.samples.dspservicebuilder.model.Country in project liferay-blade-samples by liferay.
the class CountryPersistenceImpl method clearCache.
@Override
public void clearCache(List<Country> countries) {
finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
for (Country country : countries) {
entityCache.removeResult(entityCacheEnabled, CountryImpl.class, country.getPrimaryKey());
}
}
use of com.liferay.blade.samples.dspservicebuilder.model.Country in project liferay-blade-samples by liferay.
the class CountryModelImpl method toString.
@Override
public String toString() {
Map<String, Function<Country, Object>> attributeGetterFunctions = getAttributeGetterFunctions();
StringBundler sb = new StringBundler(4 * attributeGetterFunctions.size() + 2);
sb.append("{");
for (Map.Entry<String, Function<Country, Object>> entry : attributeGetterFunctions.entrySet()) {
String attributeName = entry.getKey();
Function<Country, Object> attributeGetterFunction = entry.getValue();
sb.append(attributeName);
sb.append("=");
sb.append(attributeGetterFunction.apply((Country) this));
sb.append(", ");
}
if (sb.index() > 1) {
sb.setIndex(sb.index() - 1);
}
sb.append("}");
return sb.toString();
}
Aggregations