Skip to content

Commit 29e3147

Browse files
matyaswollnerbrianchandotcom
authored andcommitted
LPD-54484 autogenerated(buildService)
1 parent 64a5f96 commit 29e3147

File tree

12 files changed

+122
-5
lines changed

12 files changed

+122
-5
lines changed

modules/apps/account/account-api/src/main/java/com/liferay/account/model/AccountGroupModel.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,20 @@ public interface AccountGroupModel
279279
*/
280280
public void setType(String type);
281281

282+
/**
283+
* Returns the status of this account group.
284+
*
285+
* @return the status of this account group
286+
*/
287+
public int getStatus();
288+
289+
/**
290+
* Sets the status of this account group.
291+
*
292+
* @param status the status of this account group
293+
*/
294+
public void setStatus(int status);
295+
282296
@Override
283297
public AccountGroup cloneWithOriginalValues();
284298

modules/apps/account/account-api/src/main/java/com/liferay/account/model/AccountGroupTable.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ public class AccountGroupTable extends BaseTable<AccountGroupTable> {
5353
"name", String.class, Types.VARCHAR, Column.FLAG_DEFAULT);
5454
public final Column<AccountGroupTable, String> type = createColumn(
5555
"type_", String.class, Types.VARCHAR, Column.FLAG_DEFAULT);
56+
public final Column<AccountGroupTable, Integer> status = createColumn(
57+
"status", Integer.class, Types.INTEGER, Column.FLAG_DEFAULT);
5658

5759
private AccountGroupTable() {
5860
super("AccountGroup", AccountGroupTable::new);

modules/apps/account/account-api/src/main/java/com/liferay/account/model/AccountGroupWrapper.java

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ public Map<String, Object> getModelAttributes() {
4747
attributes.put("description", getDescription());
4848
attributes.put("name", getName());
4949
attributes.put("type", getType());
50+
attributes.put("status", getStatus());
5051

5152
return attributes;
5253
}
@@ -132,6 +133,12 @@ public void setModelAttributes(Map<String, Object> attributes) {
132133
if (type != null) {
133134
setType(type);
134135
}
136+
137+
Integer status = (Integer)attributes.get("status");
138+
139+
if (status != null) {
140+
setStatus(status);
141+
}
135142
}
136143

137144
@Override
@@ -239,6 +246,16 @@ public long getPrimaryKey() {
239246
return model.getPrimaryKey();
240247
}
241248

249+
/**
250+
* Returns the status of this account group.
251+
*
252+
* @return the status of this account group
253+
*/
254+
@Override
255+
public int getStatus() {
256+
return model.getStatus();
257+
}
258+
242259
/**
243260
* Returns the type of this account group.
244261
*
@@ -404,6 +421,16 @@ public void setPrimaryKey(long primaryKey) {
404421
model.setPrimaryKey(primaryKey);
405422
}
406423

424+
/**
425+
* Sets the status of this account group.
426+
*
427+
* @param status the status of this account group
428+
*/
429+
@Override
430+
public void setStatus(int status) {
431+
model.setStatus(status);
432+
}
433+
407434
/**
408435
* Sets the type of this account group.
409436
*

modules/apps/account/account-api/src/main/java/com/liferay/account/service/AccountGroupLocalService.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,12 @@ public ExportActionableDynamicQuery getExportActionableDynamicQuery(
319319
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
320320
public IndexableActionableDynamicQuery getIndexableActionableDynamicQuery();
321321

322+
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
323+
public AccountGroup getOrAddIncompleteAccountGroup(
324+
String externalReferenceCode, long companyId, long userId,
325+
String name)
326+
throws Exception;
327+
322328
/**
323329
* Returns the OSGi service identifier.
324330
*

modules/apps/account/account-api/src/main/java/com/liferay/account/service/AccountGroupLocalServiceUtil.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,15 @@ public static AccountGroup getDefaultAccountGroup(long companyId) {
374374
return getService().getIndexableActionableDynamicQuery();
375375
}
376376

377+
public static AccountGroup getOrAddIncompleteAccountGroup(
378+
String externalReferenceCode, long companyId, long userId,
379+
String name)
380+
throws Exception {
381+
382+
return getService().getOrAddIncompleteAccountGroup(
383+
externalReferenceCode, companyId, userId, name);
384+
}
385+
377386
/**
378387
* Returns the OSGi service identifier.
379388
*

modules/apps/account/account-api/src/main/java/com/liferay/account/service/AccountGroupLocalServiceWrapper.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,17 @@ public com.liferay.account.model.AccountGroup getDefaultAccountGroup(
433433
return _accountGroupLocalService.getIndexableActionableDynamicQuery();
434434
}
435435

436+
@Override
437+
public com.liferay.account.model.AccountGroup
438+
getOrAddIncompleteAccountGroup(
439+
String externalReferenceCode, long companyId, long userId,
440+
String name)
441+
throws Exception {
442+
443+
return _accountGroupLocalService.getOrAddIncompleteAccountGroup(
444+
externalReferenceCode, companyId, userId, name);
445+
}
446+
436447
/**
437448
* Returns the OSGi service identifier.
438449
*

modules/apps/account/account-service/src/main/java/com/liferay/account/model/impl/AccountGroupCacheModel.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public void setMvccVersion(long mvccVersion) {
6868

6969
@Override
7070
public String toString() {
71-
StringBundler sb = new StringBundler(27);
71+
StringBundler sb = new StringBundler(29);
7272

7373
sb.append("{mvccVersion=");
7474
sb.append(mvccVersion);
@@ -96,6 +96,8 @@ public String toString() {
9696
sb.append(name);
9797
sb.append(", type=");
9898
sb.append(type);
99+
sb.append(", status=");
100+
sb.append(status);
99101
sb.append("}");
100102

101103
return sb.toString();
@@ -169,6 +171,8 @@ public AccountGroup toEntityModel() {
169171
accountGroupImpl.setType(type);
170172
}
171173

174+
accountGroupImpl.setStatus(status);
175+
172176
accountGroupImpl.resetOriginalValues();
173177

174178
return accountGroupImpl;
@@ -193,6 +197,8 @@ public void readExternal(ObjectInput objectInput) throws IOException {
193197
description = objectInput.readUTF();
194198
name = objectInput.readUTF();
195199
type = objectInput.readUTF();
200+
201+
status = objectInput.readInt();
196202
}
197203

198204
@Override
@@ -251,6 +257,8 @@ public void writeExternal(ObjectOutput objectOutput) throws IOException {
251257
else {
252258
objectOutput.writeUTF(type);
253259
}
260+
261+
objectOutput.writeInt(status);
254262
}
255263

256264
public long mvccVersion;
@@ -266,5 +274,6 @@ public void writeExternal(ObjectOutput objectOutput) throws IOException {
266274
public String description;
267275
public String name;
268276
public String type;
277+
public int status;
269278

270279
}

modules/apps/account/account-service/src/main/java/com/liferay/account/model/impl/AccountGroupModelImpl.java

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ public class AccountGroupModelImpl
7070
{"userId", Types.BIGINT}, {"userName", Types.VARCHAR},
7171
{"createDate", Types.TIMESTAMP}, {"modifiedDate", Types.TIMESTAMP},
7272
{"defaultAccountGroup", Types.BOOLEAN}, {"description", Types.VARCHAR},
73-
{"name", Types.VARCHAR}, {"type_", Types.VARCHAR}
73+
{"name", Types.VARCHAR}, {"type_", Types.VARCHAR},
74+
{"status", Types.INTEGER}
7475
};
7576

7677
public static final Map<String, Integer> TABLE_COLUMNS_MAP =
@@ -90,10 +91,11 @@ public class AccountGroupModelImpl
9091
TABLE_COLUMNS_MAP.put("description", Types.VARCHAR);
9192
TABLE_COLUMNS_MAP.put("name", Types.VARCHAR);
9293
TABLE_COLUMNS_MAP.put("type_", Types.VARCHAR);
94+
TABLE_COLUMNS_MAP.put("status", Types.INTEGER);
9395
}
9496

9597
public static final String TABLE_SQL_CREATE =
96-
"create table AccountGroup (mvccVersion LONG default 0 not null,uuid_ VARCHAR(75) null,externalReferenceCode VARCHAR(75) null,accountGroupId LONG not null primary key,companyId LONG,userId LONG,userName VARCHAR(75) null,createDate DATE null,modifiedDate DATE null,defaultAccountGroup BOOLEAN,description VARCHAR(75) null,name VARCHAR(75) null,type_ VARCHAR(75) null)";
98+
"create table AccountGroup (mvccVersion LONG default 0 not null,uuid_ VARCHAR(75) null,externalReferenceCode VARCHAR(75) null,accountGroupId LONG not null primary key,companyId LONG,userId LONG,userName VARCHAR(75) null,createDate DATE null,modifiedDate DATE null,defaultAccountGroup BOOLEAN,description VARCHAR(75) null,name VARCHAR(75) null,type_ VARCHAR(75) null,status INTEGER)";
9799

98100
public static final String TABLE_SQL_DROP = "drop table AccountGroup";
99101

@@ -285,6 +287,7 @@ private static class AttributeGetterFunctionsHolder {
285287
"description", AccountGroup::getDescription);
286288
attributeGetterFunctions.put("name", AccountGroup::getName);
287289
attributeGetterFunctions.put("type", AccountGroup::getType);
290+
attributeGetterFunctions.put("status", AccountGroup::getStatus);
288291

289292
_attributeGetterFunctions = Collections.unmodifiableMap(
290293
attributeGetterFunctions);
@@ -344,6 +347,9 @@ private static class AttributeSetterBiConsumersHolder {
344347
attributeSetterBiConsumers.put(
345348
"type",
346349
(BiConsumer<AccountGroup, String>)AccountGroup::setType);
350+
attributeSetterBiConsumers.put(
351+
"status",
352+
(BiConsumer<AccountGroup, Integer>)AccountGroup::setStatus);
347353

348354
_attributeSetterBiConsumers = Collections.unmodifiableMap(
349355
(Map)attributeSetterBiConsumers);
@@ -670,6 +676,21 @@ public String getOriginalType() {
670676
return getColumnOriginalValue("type_");
671677
}
672678

679+
@JSON
680+
@Override
681+
public int getStatus() {
682+
return _status;
683+
}
684+
685+
@Override
686+
public void setStatus(int status) {
687+
if (_columnOriginalValues == Collections.EMPTY_MAP) {
688+
_setColumnOriginalValues();
689+
}
690+
691+
_status = status;
692+
}
693+
673694
@Override
674695
public StagedModelType getStagedModelType() {
675696
return new StagedModelType(
@@ -745,6 +766,7 @@ public Object clone() {
745766
accountGroupImpl.setDescription(getDescription());
746767
accountGroupImpl.setName(getName());
747768
accountGroupImpl.setType(getType());
769+
accountGroupImpl.setStatus(getStatus());
748770

749771
accountGroupImpl.resetOriginalValues();
750772

@@ -777,6 +799,8 @@ public AccountGroup cloneWithOriginalValues() {
777799
this.<String>getColumnOriginalValue("description"));
778800
accountGroupImpl.setName(this.<String>getColumnOriginalValue("name"));
779801
accountGroupImpl.setType(this.<String>getColumnOriginalValue("type_"));
802+
accountGroupImpl.setStatus(
803+
this.<Integer>getColumnOriginalValue("status"));
780804

781805
return accountGroupImpl;
782806
}
@@ -935,6 +959,8 @@ public CacheModel<AccountGroup> toCacheModel() {
935959
accountGroupCacheModel.type = null;
936960
}
937961

962+
accountGroupCacheModel.status = getStatus();
963+
938964
return accountGroupCacheModel;
939965
}
940966

@@ -1010,6 +1036,7 @@ private static class EscapedModelProxyProviderFunctionHolder {
10101036
private String _description;
10111037
private String _name;
10121038
private String _type;
1039+
private int _status;
10131040

10141041
public <T> T getColumnValue(String columnName) {
10151042
columnName = _attributeNames.getOrDefault(columnName, columnName);
@@ -1055,6 +1082,7 @@ private void _setColumnOriginalValues() {
10551082
_columnOriginalValues.put("description", _description);
10561083
_columnOriginalValues.put("name", _name);
10571084
_columnOriginalValues.put("type_", _type);
1085+
_columnOriginalValues.put("status", _status);
10581086
}
10591087

10601088
private static final Map<String, String> _attributeNames;
@@ -1105,6 +1133,8 @@ public static long getColumnBitmask(String columnName) {
11051133

11061134
columnBitmasks.put("type_", 4096L);
11071135

1136+
columnBitmasks.put("status", 8192L);
1137+
11081138
_columnBitmasks = Collections.unmodifiableMap(columnBitmasks);
11091139
}
11101140

modules/apps/account/account-service/src/main/resources/META-INF/module-hbm.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272
<property access="com.liferay.portal.dao.orm.hibernate.MethodPropertyAccessor" name="description" type="com.liferay.portal.dao.orm.hibernate.StringType" />
7373
<property access="com.liferay.portal.dao.orm.hibernate.MethodPropertyAccessor" name="name" type="com.liferay.portal.dao.orm.hibernate.StringType" />
7474
<property access="com.liferay.portal.dao.orm.hibernate.MethodPropertyAccessor" column="type_" name="type" type="com.liferay.portal.dao.orm.hibernate.StringType" />
75+
<property access="com.liferay.portal.dao.orm.hibernate.MethodPropertyAccessor" name="status" type="com.liferay.portal.dao.orm.hibernate.IntegerType" />
7576
</class>
7677
<class dynamic-update="true" name="com.liferay.account.model.impl.AccountGroupRelImpl" table="AccountGroupRel">
7778
<id access="com.liferay.portal.dao.orm.hibernate.MethodPropertyAccessor" name="accountGroupRelId" type="long">

modules/apps/account/account-service/src/main/resources/META-INF/portlet-model-hints.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
<validator name="required" />
7070
</field>
7171
<field name="type" type="String" />
72+
<field name="status" type="int" />
7273
</model>
7374
<model name="com.liferay.account.model.AccountGroupRel">
7475
<field name="mvccVersion" type="long" />

0 commit comments

Comments
 (0)