generated from adempiere/adempiere-grpc-template-service
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c29f0ea
commit ab33f23
Showing
5 changed files
with
438 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
112 changes: 112 additions & 0 deletions
112
src/main/java/org/spin/report_engine/format/PrintFormatColumn.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
/************************************************************************************ | ||
* Copyright (C) 2012-2018 E.R.P. Consultores y Asociados, C.A. * | ||
* Contributor(s): Yamel Senih ysenih@erpya.com * | ||
* This program is free software: you can redistribute it and/or modify * | ||
* it under the terms of the GNU General Public License as published by * | ||
* the Free Software Foundation, either version 2 of the License, or * | ||
* (at your option) any later version. * | ||
* This program is distributed in the hope that it will be useful, * | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of * | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * | ||
* GNU General Public License for more details. * | ||
* You should have received a copy of the GNU General Public License * | ||
* along with this program. If not, see <https://www.gnu.org/licenses/>. * | ||
************************************************************************************/ | ||
package org.spin.report_engine.format; | ||
|
||
import org.compiere.util.Util; | ||
|
||
/** | ||
* Print Format Line Representation | ||
* @author Yamel Senih, ysenih@erpya.com, ERPCyA http://www.erpya.com | ||
*/ | ||
public class PrintFormatColumn { | ||
|
||
private int printFormatItemId; | ||
// Column attributes | ||
private String columnName; | ||
private String columnNameAlias; | ||
private int columnId; | ||
private int referenceId; | ||
private int referenceValueId; | ||
private boolean isKey; | ||
private boolean isParent; | ||
private boolean isMandatory; | ||
private boolean isVirtualColumn; | ||
private String columnSql; | ||
|
||
private PrintFormatColumn(PrintFormatItem printFormatItem) { | ||
printFormatItemId = printFormatItem.getPrintFormatItemId(); | ||
columnName = printFormatItem.getColumnName(); | ||
columnId = printFormatItem.getColumnId(); | ||
referenceId = printFormatItem.getReferenceId(); | ||
referenceValueId = printFormatItem.getReferenceValueId(); | ||
isKey = printFormatItem.isKey(); | ||
isParent = printFormatItem.isParent(); | ||
isMandatory = printFormatItem.isMandatory(); | ||
columnSql = printFormatItem.getColumnSql(); | ||
isVirtualColumn = !Util.isEmpty(printFormatItem.getColumnSql()); | ||
} | ||
|
||
public static PrintFormatColumn newInstance(PrintFormatItem printFormatItem) { | ||
return new PrintFormatColumn(printFormatItem); | ||
} | ||
|
||
public int getPrintFormatItemId() { | ||
return printFormatItemId; | ||
} | ||
|
||
public String getColumnName() { | ||
return columnName; | ||
} | ||
|
||
public int getColumnId() { | ||
return columnId; | ||
} | ||
|
||
public int getReferenceId() { | ||
return referenceId; | ||
} | ||
|
||
public int getReferenceValueId() { | ||
return referenceValueId; | ||
} | ||
|
||
public boolean isKey() { | ||
return isKey; | ||
} | ||
|
||
public boolean isParent() { | ||
return isParent; | ||
} | ||
|
||
public boolean isVirtualColumn() { | ||
return isVirtualColumn; | ||
} | ||
|
||
public String getColumnSql() { | ||
return columnSql; | ||
} | ||
|
||
public boolean isMandatory() { | ||
return isMandatory; | ||
} | ||
|
||
public String getColumnNameAlias() { | ||
return columnNameAlias; | ||
} | ||
|
||
public PrintFormatColumn withColumnNameAlias(String columnNameAlias) { | ||
this.columnNameAlias = columnNameAlias; | ||
return this; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "PrintFormatColumn [printFormatItemId=" + printFormatItemId + ", columnName=" + columnName | ||
+ ", columnNameAlias=" + columnNameAlias + ", columnId=" + columnId + ", referenceId=" + referenceId | ||
+ ", referenceValueId=" + referenceValueId + ", isKey=" + isKey + ", isParent=" + isParent | ||
+ ", isMandatory=" + isMandatory + ", isVirtualColumn=" + isVirtualColumn + ", columnSql=" + columnSql | ||
+ "]"; | ||
} | ||
} |
Oops, something went wrong.