use of com.liferay.petra.string.StringBundler in project liferay-blade-samples by liferay.
the class BazCacheModel method toString.
@Override
public String toString() {
StringBundler sb = new StringBundler(25);
sb.append("{uuid=");
sb.append(uuid);
sb.append(", bazId=");
sb.append(bazId);
sb.append(", groupId=");
sb.append(groupId);
sb.append(", companyId=");
sb.append(companyId);
sb.append(", userId=");
sb.append(userId);
sb.append(", userName=");
sb.append(userName);
sb.append(", createDate=");
sb.append(createDate);
sb.append(", modifiedDate=");
sb.append(modifiedDate);
sb.append(", status=");
sb.append(status);
sb.append(", statusByUserId=");
sb.append(statusByUserId);
sb.append(", statusByUserName=");
sb.append(statusByUserName);
sb.append(", statusDate=");
sb.append(statusDate);
sb.append("}");
return sb.toString();
}
use of com.liferay.petra.string.StringBundler in project liferay-blade-samples by liferay.
the class BazModelImpl method toString.
@Override
public String toString() {
Map<String, Function<Baz, Object>> attributeGetterFunctions = getAttributeGetterFunctions();
StringBundler sb = new StringBundler(4 * attributeGetterFunctions.size() + 2);
sb.append("{");
for (Map.Entry<String, Function<Baz, Object>> entry : attributeGetterFunctions.entrySet()) {
String attributeName = entry.getKey();
Function<Baz, Object> attributeGetterFunction = entry.getValue();
sb.append(attributeName);
sb.append("=");
sb.append(attributeGetterFunction.apply((Baz) this));
sb.append(", ");
}
if (sb.index() > 1) {
sb.setIndex(sb.index() - 1);
}
sb.append("}");
return sb.toString();
}
use of com.liferay.petra.string.StringBundler in project liferay-blade-samples by liferay.
the class BazModelImpl method toXmlString.
@Override
public String toXmlString() {
Map<String, Function<Baz, 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<Baz, Object>> entry : attributeGetterFunctions.entrySet()) {
String attributeName = entry.getKey();
Function<Baz, Object> attributeGetterFunction = entry.getValue();
sb.append("<column><column-name>");
sb.append(attributeName);
sb.append("</column-name><column-value><![CDATA[");
sb.append(attributeGetterFunction.apply((Baz) this));
sb.append("]]></column-value></column>");
}
sb.append("</model>");
return sb.toString();
}
use of com.liferay.petra.string.StringBundler in project liferay-blade-samples by liferay.
the class BarPersistenceImpl method findByUuid_First.
/**
* Returns the first bar in the ordered set where uuid = ?.
*
* @param uuid the uuid
* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
* @return the first matching bar
* @throws NoSuchBarException if a matching bar could not be found
*/
@Override
public Bar findByUuid_First(String uuid, OrderByComparator<Bar> orderByComparator) throws NoSuchBarException {
Bar bar = fetchByUuid_First(uuid, orderByComparator);
if (bar != null) {
return bar;
}
StringBundler msg = new StringBundler(4);
msg.append(_NO_SUCH_ENTITY_WITH_KEY);
msg.append("uuid=");
msg.append(uuid);
msg.append("}");
throw new NoSuchBarException(msg.toString());
}
use of com.liferay.petra.string.StringBundler in project liferay-blade-samples by liferay.
the class BarPersistenceImpl method findByUUID_G.
/**
* Returns the bar where uuid = ? and groupId = ? or throws a <code>NoSuchBarException</code> if it could not be found.
*
* @param uuid the uuid
* @param groupId the group ID
* @return the matching bar
* @throws NoSuchBarException if a matching bar could not be found
*/
@Override
public Bar findByUUID_G(String uuid, long groupId) throws NoSuchBarException {
Bar bar = fetchByUUID_G(uuid, groupId);
if (bar == null) {
StringBundler msg = new StringBundler(6);
msg.append(_NO_SUCH_ENTITY_WITH_KEY);
msg.append("uuid=");
msg.append(uuid);
msg.append(", groupId=");
msg.append(groupId);
msg.append("}");
if (_log.isDebugEnabled()) {
_log.debug(msg.toString());
}
throw new NoSuchBarException(msg.toString());
}
return bar;
}
Aggregations