first commit
This commit is contained in:
commit
4d332ef662
27586 changed files with 3281783 additions and 0 deletions
1266
rus/WEB-INF/lib/ablia_src/com/ablia/common/Access.java
Normal file
1266
rus/WEB-INF/lib/ablia_src/com/ablia/common/Access.java
Normal file
File diff suppressed because it is too large
Load diff
32
rus/WEB-INF/lib/ablia_src/com/ablia/common/AccessCR.java
Normal file
32
rus/WEB-INF/lib/ablia_src/com/ablia/common/AccessCR.java
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
package com.ablia.common;
|
||||
|
||||
import com.ablia.db.ApplParmFull;
|
||||
import com.ablia.db.CRAdapter;
|
||||
|
||||
public class AccessCR extends CRAdapter {
|
||||
private String id_access;
|
||||
|
||||
private long flgTabella = -1L;
|
||||
|
||||
public AccessCR() {}
|
||||
|
||||
public AccessCR(ApplParmFull newAp) {
|
||||
super(newAp);
|
||||
}
|
||||
|
||||
public String getId_access() {
|
||||
return this.id_access;
|
||||
}
|
||||
|
||||
public void setId_access(String id_access) {
|
||||
this.id_access = id_access;
|
||||
}
|
||||
|
||||
public long getFlgTabella() {
|
||||
return this.flgTabella;
|
||||
}
|
||||
|
||||
public void setFlgTabella(long flgTabella) {
|
||||
this.flgTabella = flgTabella;
|
||||
}
|
||||
}
|
||||
137
rus/WEB-INF/lib/ablia_src/com/ablia/common/AccessDitta.java
Normal file
137
rus/WEB-INF/lib/ablia_src/com/ablia/common/AccessDitta.java
Normal file
|
|
@ -0,0 +1,137 @@
|
|||
package com.ablia.common;
|
||||
|
||||
import com.ablia.db.ApplParmFull;
|
||||
import com.ablia.db.DBAdapter;
|
||||
import com.ablia.db.ResParm;
|
||||
import com.ablia.db.WcString;
|
||||
import com.ablia.util.StringTokenizer;
|
||||
import com.ablia.util.Vectumerator;
|
||||
import java.io.Serializable;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.SQLException;
|
||||
|
||||
public class AccessDitta extends DBAdapter implements Serializable {
|
||||
private static final long serialVersionUID = -1022126863968745800L;
|
||||
|
||||
private long id_accessDitta;
|
||||
|
||||
private String id_access;
|
||||
|
||||
private String attr1Maiuscoli;
|
||||
|
||||
private String attrMaiuscoli;
|
||||
|
||||
private String attrMinuscoli;
|
||||
|
||||
private String descrizione;
|
||||
|
||||
private long flgSafeUpdate;
|
||||
|
||||
private Access access;
|
||||
|
||||
public AccessDitta(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public AccessDitta() {}
|
||||
|
||||
public void setId_accessDitta(long newId_accessDitta) {
|
||||
this.id_accessDitta = newId_accessDitta;
|
||||
}
|
||||
|
||||
public void setId_access(String newId_access) {
|
||||
this.id_access = newId_access;
|
||||
setAccess(null);
|
||||
}
|
||||
|
||||
public void setAttr1Maiuscoli(String newAttr1Maiuscoli) {
|
||||
this.attr1Maiuscoli = newAttr1Maiuscoli;
|
||||
}
|
||||
|
||||
public void setAttrMaiuscoli(String newAttrMaiuscoli) {
|
||||
this.attrMaiuscoli = newAttrMaiuscoli;
|
||||
}
|
||||
|
||||
public void setAttrMinuscoli(String newAttrMinuscoli) {
|
||||
this.attrMinuscoli = newAttrMinuscoli;
|
||||
}
|
||||
|
||||
public void setDescrizione(String newDescrizione) {
|
||||
this.descrizione = newDescrizione;
|
||||
}
|
||||
|
||||
public void setFlgSafeUpdate(long newFlgSafeUpdate) {
|
||||
this.flgSafeUpdate = newFlgSafeUpdate;
|
||||
}
|
||||
|
||||
public long getId_accessDitta() {
|
||||
return this.id_accessDitta;
|
||||
}
|
||||
|
||||
public String getId_access() {
|
||||
return (this.id_access == null) ? "" : this.id_access.trim();
|
||||
}
|
||||
|
||||
public String getAttr1Maiuscoli() {
|
||||
return (this.attr1Maiuscoli == null) ? "" : this.attr1Maiuscoli.trim();
|
||||
}
|
||||
|
||||
public String getAttrMaiuscoli() {
|
||||
return (this.attrMaiuscoli == null) ? "" : this.attrMaiuscoli.trim();
|
||||
}
|
||||
|
||||
public String getAttrMinuscoli() {
|
||||
return (this.attrMinuscoli == null) ? "" : this.attrMinuscoli.trim();
|
||||
}
|
||||
|
||||
public String getDescrizione() {
|
||||
return (this.descrizione == null) ? "" : this.descrizione.trim();
|
||||
}
|
||||
|
||||
public long getFlgSafeUpdate() {
|
||||
return this.flgSafeUpdate;
|
||||
}
|
||||
|
||||
public void setAccess(Access newAccess) {
|
||||
this.access = newAccess;
|
||||
}
|
||||
|
||||
public Access getAccess() {
|
||||
this.access = (Access)getSecondaryObject(
|
||||
this.access,
|
||||
Access.class, getId_access());
|
||||
return this.access;
|
||||
}
|
||||
|
||||
protected ResParm checkDeleteCascade() {
|
||||
return new ResParm(true);
|
||||
}
|
||||
|
||||
protected void deleteCascade() {}
|
||||
|
||||
public Vectumerator<? extends DBAdapter> findByCR(AccessDittaCR CR, int pageNumber, int pageRows) {
|
||||
String s_Sql_Find = "select A.* from ACCESS_DITTA AS A";
|
||||
String s_Sql_Order = "";
|
||||
WcString wc = new WcString();
|
||||
if (!CR.getSearchTxt().trim().isEmpty()) {
|
||||
StringTokenizer st = new StringTokenizer(CR.getSearchTxt().trim(), " ");
|
||||
StringBuffer txt = new StringBuffer("(");
|
||||
while (st.hasMoreTokens()) {
|
||||
String token = st.nextToken();
|
||||
txt.append("(A.Cognome like '%" + token + "%' or A.Nome like '%" + token + "%')");
|
||||
if (st.hasMoreTokens())
|
||||
txt.append(" and ");
|
||||
}
|
||||
txt.append(")");
|
||||
wc.addWc(txt.toString());
|
||||
}
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(String.valueOf(s_Sql_Find) + wc.toString() + s_Sql_Order);
|
||||
return findRows(stmt, pageNumber, pageRows);
|
||||
} catch (SQLException e) {
|
||||
removeCPConnection();
|
||||
handleDebug(e);
|
||||
return AB_EMPTY_VECTUMERATOR;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,96 @@
|
|||
package com.ablia.common;
|
||||
|
||||
import com.ablia.db.ApplParmFull;
|
||||
import com.ablia.db.CRAdapter;
|
||||
|
||||
public class AccessDittaCR extends CRAdapter {
|
||||
private long id_accessDitta;
|
||||
|
||||
private String id_access;
|
||||
|
||||
private String attr1Maiuscoli;
|
||||
|
||||
private String attrMaiuscoli;
|
||||
|
||||
private String attrMinuscoli;
|
||||
|
||||
private String descrizione;
|
||||
|
||||
private long flgSafeUpdate;
|
||||
|
||||
private Access access;
|
||||
|
||||
public AccessDittaCR(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public AccessDittaCR() {}
|
||||
|
||||
public void setId_accessDitta(long newId_accessDitta) {
|
||||
this.id_accessDitta = newId_accessDitta;
|
||||
}
|
||||
|
||||
public void setId_access(String newId_access) {
|
||||
this.id_access = newId_access;
|
||||
setAccess(null);
|
||||
}
|
||||
|
||||
public void setAttr1Maiuscoli(String newAttr1Maiuscoli) {
|
||||
this.attr1Maiuscoli = newAttr1Maiuscoli;
|
||||
}
|
||||
|
||||
public void setAttrMaiuscoli(String newAttrMaiuscoli) {
|
||||
this.attrMaiuscoli = newAttrMaiuscoli;
|
||||
}
|
||||
|
||||
public void setAttrMinuscoli(String newAttrMinuscoli) {
|
||||
this.attrMinuscoli = newAttrMinuscoli;
|
||||
}
|
||||
|
||||
public void setDescrizione(String newDescrizione) {
|
||||
this.descrizione = newDescrizione;
|
||||
}
|
||||
|
||||
public void setFlgSafeUpdate(long newFlgSafeUpdate) {
|
||||
this.flgSafeUpdate = newFlgSafeUpdate;
|
||||
}
|
||||
|
||||
public long getId_accessDitta() {
|
||||
return this.id_accessDitta;
|
||||
}
|
||||
|
||||
public String getId_access() {
|
||||
return (this.id_access == null) ? "" : this.id_access.trim();
|
||||
}
|
||||
|
||||
public String getAttr1Maiuscoli() {
|
||||
return (this.attr1Maiuscoli == null) ? "" : this.attr1Maiuscoli.trim();
|
||||
}
|
||||
|
||||
public String getAttrMaiuscoli() {
|
||||
return (this.attrMaiuscoli == null) ? "" : this.attrMaiuscoli.trim();
|
||||
}
|
||||
|
||||
public String getAttrMinuscoli() {
|
||||
return (this.attrMinuscoli == null) ? "" : this.attrMinuscoli.trim();
|
||||
}
|
||||
|
||||
public String getDescrizione() {
|
||||
return (this.descrizione == null) ? "" : this.descrizione.trim();
|
||||
}
|
||||
|
||||
public long getFlgSafeUpdate() {
|
||||
return this.flgSafeUpdate;
|
||||
}
|
||||
|
||||
public void setAccess(Access newAccess) {
|
||||
this.access = newAccess;
|
||||
}
|
||||
|
||||
public Access getAccess() {
|
||||
this.access = (Access)getSecondaryObject(
|
||||
this.access,
|
||||
Access.class, getId_access());
|
||||
return this.access;
|
||||
}
|
||||
}
|
||||
190
rus/WEB-INF/lib/ablia_src/com/ablia/common/AccessGroup.java
Normal file
190
rus/WEB-INF/lib/ablia_src/com/ablia/common/AccessGroup.java
Normal file
|
|
@ -0,0 +1,190 @@
|
|||
package com.ablia.common;
|
||||
|
||||
import com.ablia.db.ApplParmFull;
|
||||
import com.ablia.db.DBAdapter;
|
||||
import com.ablia.db.ResParm;
|
||||
import com.ablia.db.WcString;
|
||||
import com.ablia.util.StringTokenizer;
|
||||
import com.ablia.util.Vectumerator;
|
||||
import java.io.Serializable;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.SQLException;
|
||||
|
||||
public class AccessGroup extends DBAdapter implements Serializable {
|
||||
private long id_accessGroup;
|
||||
|
||||
private String descrizione;
|
||||
|
||||
private String nota;
|
||||
|
||||
public AccessGroup(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public AccessGroup() {}
|
||||
|
||||
public void setId_accessGroup(long newId_accessGroup) {
|
||||
this.id_accessGroup = newId_accessGroup;
|
||||
}
|
||||
|
||||
public void setDescrizione(String newDescrizione) {
|
||||
this.descrizione = newDescrizione;
|
||||
}
|
||||
|
||||
public long getId_accessGroup() {
|
||||
return this.id_accessGroup;
|
||||
}
|
||||
|
||||
public String getDescrizione() {
|
||||
return (this.descrizione == null) ? "" : this.descrizione;
|
||||
}
|
||||
|
||||
public String getUsers() {
|
||||
if (getId_accessGroup() != 0L) {
|
||||
Vectumerator<UserAccessGroup> vec = getUserAccessGroup(0, 0);
|
||||
StringBuffer temp = new StringBuffer();
|
||||
while (vec.hasMoreElements()) {
|
||||
UserAccessGroup row = vec.nextElement();
|
||||
temp.append(row.getUsers().getCognomeNome());
|
||||
if (vec.hasMoreElements())
|
||||
temp.append(", ");
|
||||
}
|
||||
return temp.toString();
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
public String getAccesses() {
|
||||
if (getId_accessGroup() != 0L) {
|
||||
Vectumerator<AccessGroupAccess> vec = findAccessGroupAccess(0, 0);
|
||||
StringBuffer temp = new StringBuffer();
|
||||
while (vec.hasMoreElements()) {
|
||||
AccessGroupAccess row = vec.nextElement();
|
||||
temp.append(row.getAccess().getId_access());
|
||||
temp.append(" (" + row.getRW() + ")");
|
||||
if (vec.hasMoreElements())
|
||||
temp.append(", ");
|
||||
}
|
||||
return temp.toString();
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
protected ResParm checkDeleteCascade() {
|
||||
return new ResParm(true);
|
||||
}
|
||||
|
||||
protected void deleteCascade() {}
|
||||
|
||||
public Vectumerator findByCR(AccessGroupCR CR, int pageNumber, int pageRows) {
|
||||
String s_Sql_Find = "select A.* from ACCESS_GROUP AS A";
|
||||
String s_Sql_Order = " order by A.descrizione";
|
||||
WcString wc = new WcString();
|
||||
if (!CR.getSearchTxt().trim().isEmpty()) {
|
||||
StringTokenizer st = new StringTokenizer(CR.getSearchTxt().trim(), " ");
|
||||
StringBuffer txt = new StringBuffer("(");
|
||||
while (st.hasMoreTokens()) {
|
||||
String token = st.nextToken();
|
||||
txt.append("(A.descrizione like '%" + token + "%')");
|
||||
if (st.hasMoreTokens())
|
||||
txt.append(" and ");
|
||||
}
|
||||
txt.append(")");
|
||||
wc.addWc(txt.toString());
|
||||
}
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(String.valueOf(s_Sql_Find) + wc.toString() + s_Sql_Order);
|
||||
return findRows(stmt, pageNumber, pageRows);
|
||||
} catch (SQLException e) {
|
||||
handleDebug(e);
|
||||
return AB_EMPTY_VECTUMERATOR;
|
||||
}
|
||||
}
|
||||
|
||||
public ResParm addUser(UserAccessGroup row) {
|
||||
UserAccessGroup bean = new UserAccessGroup(getApFull());
|
||||
if (row.getId_userAccessGroup() != 0L) {
|
||||
bean.findByPrimaryKey(row.getId_userAccessGroup());
|
||||
} else {
|
||||
bean.findByAccessGroupUser(row.getId_accessGroup(), row.getId_users());
|
||||
}
|
||||
if (bean != null) {
|
||||
row.setDBState(bean.getDBState());
|
||||
row.setId_userAccessGroup(bean.getId_userAccessGroup());
|
||||
} else {
|
||||
row.setDBState(0);
|
||||
}
|
||||
return row.save();
|
||||
}
|
||||
|
||||
public ResParm delAccess(AccessGroupAccess row) {
|
||||
AccessGroupAccess bean = new AccessGroupAccess(getApFull());
|
||||
bean.findByPrimaryKey(row.getId_accessGroupAccess());
|
||||
return bean.delete();
|
||||
}
|
||||
|
||||
public ResParm addAccess(AccessGroupAccess row) {
|
||||
AccessGroupAccess bean = new AccessGroupAccess(getApFull());
|
||||
if (row.getId_accessGroupAccess() != 0L) {
|
||||
bean.findByPrimaryKey(row.getId_accessGroupAccess());
|
||||
} else {
|
||||
bean.findByAccessGroupAccess(row.getId_accessGroup(), row.getId_access());
|
||||
}
|
||||
if (bean != null) {
|
||||
row.setDBState(bean.getDBState());
|
||||
row.setId_accessGroupAccess(bean.getId_accessGroupAccess());
|
||||
} else {
|
||||
row.setDBState(0);
|
||||
}
|
||||
return row.save();
|
||||
}
|
||||
|
||||
public ResParm delUser(UserAccessGroup row) {
|
||||
UserAccessGroup bean = new UserAccessGroup(getApFull());
|
||||
bean.findByPrimaryKey(row.getId_userAccessGroup());
|
||||
return bean.delete();
|
||||
}
|
||||
|
||||
public Vectumerator<AccessGroupAccess> findAccessGroupAccess(int pageNumber, int pageRows) {
|
||||
return new AccessGroupAccess(getApFull()).findByAccessGroup(getId_accessGroup(), pageNumber, pageRows);
|
||||
}
|
||||
|
||||
public Vectumerator getUserAccessGroup(int pageNumber, int pageRows) {
|
||||
return new UserAccessGroup(getApFull()).findByAccessGroup(getId_accessGroup(), pageNumber, pageRows);
|
||||
}
|
||||
|
||||
public long getFlgRW(String l_id_access) {
|
||||
if (getId_accessGroup() == 0L)
|
||||
return 0L;
|
||||
AccessGroupAccess aga = new AccessGroupAccess(getApFull());
|
||||
aga.findByAccessGroupAccess(getId_accessGroup(), l_id_access);
|
||||
return aga.getFlgRW();
|
||||
}
|
||||
|
||||
public ResParm duplica() {
|
||||
if (getId_accessGroup() == 0L)
|
||||
return new ResParm(false, "Errore! bean non valido!");
|
||||
Vectumerator<AccessGroupAccess> vecAGA = findAccessGroupAccess(0, 0);
|
||||
setId_accessGroup(0L);
|
||||
setDBState(0);
|
||||
setDescrizione(String.valueOf(getDescrizione()) + " copia");
|
||||
ResParm rp = save();
|
||||
if (rp.getStatus())
|
||||
while (vecAGA.hasMoreElements()) {
|
||||
AccessGroupAccess rowAGA = vecAGA.nextElement();
|
||||
rowAGA.setId_accessGroupAccess(0L);
|
||||
rowAGA.setDBState(0);
|
||||
rowAGA.setId_accessGroup(getId_accessGroup());
|
||||
rowAGA.save();
|
||||
}
|
||||
return new ResParm(false, "Errore! bean non valido!");
|
||||
}
|
||||
|
||||
public String getNota() {
|
||||
return (this.nota == null) ? "" : this.nota.trim();
|
||||
}
|
||||
|
||||
public void setNota(String nota) {
|
||||
this.nota = nota;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,150 @@
|
|||
package com.ablia.common;
|
||||
|
||||
import com.ablia.db.ApplParmFull;
|
||||
import com.ablia.db.DBAdapter;
|
||||
import com.ablia.db.ResParm;
|
||||
import com.ablia.db.WcString;
|
||||
import com.ablia.util.StringTokenizer;
|
||||
import com.ablia.util.Vectumerator;
|
||||
import java.io.Serializable;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.SQLException;
|
||||
|
||||
public class AccessGroupAccess extends DBAdapter implements Serializable {
|
||||
private static final long serialVersionUID = -218207150565122890L;
|
||||
|
||||
private long id_accessGroupAccess;
|
||||
|
||||
private long flgRW;
|
||||
|
||||
private String id_access;
|
||||
|
||||
private long id_accessGroup;
|
||||
|
||||
private Access access;
|
||||
|
||||
private AccessGroup accessGroup;
|
||||
|
||||
public AccessGroupAccess(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public AccessGroupAccess() {}
|
||||
|
||||
public void setId_accessGroupAccess(long newId_accessGroupAccess) {
|
||||
this.id_accessGroupAccess = newId_accessGroupAccess;
|
||||
}
|
||||
|
||||
public void setFlgRW(long newFlgRW) {
|
||||
this.flgRW = newFlgRW;
|
||||
}
|
||||
|
||||
public void setId_access(String newId_access) {
|
||||
this.id_access = newId_access;
|
||||
setAccess(null);
|
||||
}
|
||||
|
||||
public void setId_accessGroup(long newId_accessGroup) {
|
||||
this.id_accessGroup = newId_accessGroup;
|
||||
setAccessGroup(null);
|
||||
}
|
||||
|
||||
public long getId_accessGroupAccess() {
|
||||
return this.id_accessGroupAccess;
|
||||
}
|
||||
|
||||
public long getFlgRW() {
|
||||
return this.flgRW;
|
||||
}
|
||||
|
||||
public String getId_access() {
|
||||
return (this.id_access == null) ? "" : this.id_access;
|
||||
}
|
||||
|
||||
public long getId_accessGroup() {
|
||||
return this.id_accessGroup;
|
||||
}
|
||||
|
||||
public void setAccess(Access newAccess) {
|
||||
this.access = newAccess;
|
||||
}
|
||||
|
||||
public Access getAccess() {
|
||||
this.access = (Access)getSecondaryObject(this.access, Access.class, getId_access());
|
||||
return this.access;
|
||||
}
|
||||
|
||||
public void setAccessGroup(AccessGroup newAccessGroup) {
|
||||
this.accessGroup = newAccessGroup;
|
||||
}
|
||||
|
||||
public AccessGroup getAccessGroup() {
|
||||
this.accessGroup = (AccessGroup)getSecondaryObject((DBAdapter)this.accessGroup, AccessGroup.class, getId_accessGroup());
|
||||
return this.accessGroup;
|
||||
}
|
||||
|
||||
protected ResParm checkDeleteCascade() {
|
||||
return new ResParm(true);
|
||||
}
|
||||
|
||||
protected void deleteCascade() {}
|
||||
|
||||
public Vectumerator findByCR(AccessGroupAccessCR CR, int pageNumber, int pageRows) {
|
||||
String s_Sql_Find = "select A.* from ACCESS_GROUP_ACCESS AS A";
|
||||
String s_Sql_Order = "";
|
||||
WcString wc = new WcString();
|
||||
if (!CR.getSearchTxt().trim().isEmpty()) {
|
||||
StringTokenizer st = new StringTokenizer(CR.getSearchTxt().trim(), " ");
|
||||
StringBuffer txt = new StringBuffer("(");
|
||||
while (st.hasMoreTokens()) {
|
||||
String token = st.nextToken();
|
||||
txt.append("(A.Cognome like '%" + token + "%' or A.Nome like '%" + token + "%')");
|
||||
if (st.hasMoreTokens())
|
||||
txt.append(" and ");
|
||||
}
|
||||
txt.append(")");
|
||||
wc.addWc(txt.toString());
|
||||
}
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(String.valueOf(s_Sql_Find) + wc.toString() + s_Sql_Order);
|
||||
return findRows(stmt, pageNumber, pageRows);
|
||||
} catch (SQLException e) {
|
||||
handleDebug(e);
|
||||
return AB_EMPTY_VECTUMERATOR;
|
||||
}
|
||||
}
|
||||
|
||||
public String getRW() {
|
||||
return DBAdapter.getRW(getFlgRW());
|
||||
}
|
||||
|
||||
public Vectumerator<AccessGroupAccess> findByAccessGroup(long l_id_accessGroup, int pageNumber, int pageRows) {
|
||||
String s_Sql_Find = "select A.* from ACCESS_GROUP_ACCESS AS A, ACCESS AS B";
|
||||
String s_Sql_Order = " order by B.descrizione";
|
||||
WcString wc = new WcString();
|
||||
wc.addWc("A.id_access=B.id_access");
|
||||
wc.addWc("A.id_accessGroup =" + l_id_accessGroup);
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(String.valueOf(s_Sql_Find) + wc + s_Sql_Order);
|
||||
return (Vectumerator)findRows(stmt, pageNumber, pageRows);
|
||||
} catch (Exception e) {
|
||||
handleDebug(e);
|
||||
return (Vectumerator)AB_EMPTY_VECTUMERATOR;
|
||||
}
|
||||
}
|
||||
|
||||
public void findByAccessGroupAccess(long l_id_accessGroup, String l_id_access) {
|
||||
String s_Sql_Find = "select A.* from ACCESS_GROUP_ACCESS AS A, ACCESS AS B";
|
||||
String s_Sql_Order = " order by B.descrizione";
|
||||
WcString wc = new WcString();
|
||||
wc.addWc("A.id_access=B.id_access");
|
||||
wc.addWc("A.id_accessGroup =" + l_id_accessGroup);
|
||||
wc.addWc("A.id_access ='" + l_id_access + "'");
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(String.valueOf(s_Sql_Find) + wc + s_Sql_Order);
|
||||
findFirstRecord(stmt);
|
||||
} catch (Exception e) {
|
||||
handleDebug(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
package com.ablia.common;
|
||||
|
||||
import com.ablia.db.ApplParmFull;
|
||||
import com.ablia.db.CRAdapter;
|
||||
import com.ablia.db.DBAdapter;
|
||||
|
||||
public class AccessGroupAccessCR extends CRAdapter {
|
||||
private long id_accessGroupAccess;
|
||||
|
||||
private long flgRW;
|
||||
|
||||
private String id_access;
|
||||
|
||||
private long id_accessGroup;
|
||||
|
||||
private Access access;
|
||||
|
||||
private AccessGroup accessGroup;
|
||||
|
||||
public AccessGroupAccessCR(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public AccessGroupAccessCR() {}
|
||||
|
||||
public void setId_accessGroupAccess(long newId_accessGroupAccess) {
|
||||
this.id_accessGroupAccess = newId_accessGroupAccess;
|
||||
}
|
||||
|
||||
public void setFlgRW(long newFlgRW) {
|
||||
this.flgRW = newFlgRW;
|
||||
}
|
||||
|
||||
public void setId_access(String newId_access) {
|
||||
this.id_access = newId_access;
|
||||
setAccess(null);
|
||||
}
|
||||
|
||||
public void setId_accessGroup(long newId_accessGroup) {
|
||||
this.id_accessGroup = newId_accessGroup;
|
||||
setAccessGroup(null);
|
||||
}
|
||||
|
||||
public long getId_accessGroupAccess() {
|
||||
return this.id_accessGroupAccess;
|
||||
}
|
||||
|
||||
public long getFlgRW() {
|
||||
return this.flgRW;
|
||||
}
|
||||
|
||||
public String getId_access() {
|
||||
return (this.id_access == null) ? "" : this.id_access;
|
||||
}
|
||||
|
||||
public long getId_accessGroup() {
|
||||
return this.id_accessGroup;
|
||||
}
|
||||
|
||||
public void setAccess(Access newAccess) {
|
||||
this.access = newAccess;
|
||||
}
|
||||
|
||||
public Access getAccess() {
|
||||
this.access = (Access)getSecondaryObject(
|
||||
this.access,
|
||||
Access.class, getId_access());
|
||||
return this.access;
|
||||
}
|
||||
|
||||
public void setAccessGroup(AccessGroup newAccessGroup) {
|
||||
this.accessGroup = newAccessGroup;
|
||||
}
|
||||
|
||||
public AccessGroup getAccessGroup() {
|
||||
this.accessGroup = (AccessGroup)getSecondaryObject(
|
||||
(DBAdapter)this.accessGroup,
|
||||
AccessGroup.class, getId_accessGroup());
|
||||
return this.accessGroup;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
package com.ablia.common;
|
||||
|
||||
import com.ablia.db.ApplParmFull;
|
||||
import com.ablia.db.CRAdapter;
|
||||
|
||||
public class AccessGroupCR extends CRAdapter {
|
||||
private long id_accessGroup;
|
||||
|
||||
private String descrizione;
|
||||
|
||||
public AccessGroupCR(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public AccessGroupCR() {}
|
||||
|
||||
public void setId_accessGroup(long newId_accessGroup) {
|
||||
this.id_accessGroup = newId_accessGroup;
|
||||
}
|
||||
|
||||
public void setDescrizione(String newDescrizione) {
|
||||
this.descrizione = newDescrizione;
|
||||
}
|
||||
|
||||
public long getId_accessGroup() {
|
||||
return this.id_accessGroup;
|
||||
}
|
||||
|
||||
public String getDescrizione() {
|
||||
return (this.descrizione == null) ? "" : this.descrizione;
|
||||
}
|
||||
}
|
||||
162
rus/WEB-INF/lib/ablia_src/com/ablia/common/Blacklist.java
Normal file
162
rus/WEB-INF/lib/ablia_src/com/ablia/common/Blacklist.java
Normal file
|
|
@ -0,0 +1,162 @@
|
|||
package com.ablia.common;
|
||||
|
||||
import com.ablia.db.ApplParmFull;
|
||||
import com.ablia.db.DBAdapter;
|
||||
import com.ablia.db.ResParm;
|
||||
import com.ablia.db.WcString;
|
||||
import com.ablia.util.StringTokenizer;
|
||||
import com.ablia.util.Vectumerator;
|
||||
import java.io.Serializable;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.SQLException;
|
||||
|
||||
public class Blacklist extends DBAdapter implements Serializable {
|
||||
private long id_blacklist;
|
||||
|
||||
private long flgAttivo;
|
||||
|
||||
private String descrizione;
|
||||
|
||||
private String ipAddress;
|
||||
|
||||
private String eMail;
|
||||
|
||||
public Blacklist(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public Blacklist() {}
|
||||
|
||||
public void setId_blacklist(long newId_blackList) {
|
||||
this.id_blacklist = newId_blackList;
|
||||
}
|
||||
|
||||
public void setFlgAttivo(long newFlgAttivo) {
|
||||
this.flgAttivo = newFlgAttivo;
|
||||
}
|
||||
|
||||
public void setIpAddress(String newIpAddress) {
|
||||
this.ipAddress = newIpAddress;
|
||||
}
|
||||
|
||||
public void setEMail(String newEMail) {
|
||||
this.eMail = newEMail;
|
||||
}
|
||||
|
||||
public long getId_blacklist() {
|
||||
return this.id_blacklist;
|
||||
}
|
||||
|
||||
public String getAttivo() {
|
||||
return (this.flgAttivo == 0L) ? "N" : "S";
|
||||
}
|
||||
|
||||
public long getFlgAttivo() {
|
||||
return this.flgAttivo;
|
||||
}
|
||||
|
||||
public String getIpAddress() {
|
||||
return (this.ipAddress == null) ? "" : this.ipAddress.trim();
|
||||
}
|
||||
|
||||
public String getEMail() {
|
||||
return (this.eMail == null) ? "" : this.eMail.trim();
|
||||
}
|
||||
|
||||
protected ResParm checkDeleteCascade() {
|
||||
return new ResParm(true);
|
||||
}
|
||||
|
||||
protected void deleteCascade() {}
|
||||
|
||||
public Vectumerator findByCR(BlacklistCR CR, int pageNumber, int pageRows) {
|
||||
String s_Sql_Find = "select A.* from BLACKLIST AS A";
|
||||
String s_Sql_Order = "";
|
||||
WcString wc = new WcString();
|
||||
if (!CR.getSearchTxt().trim().isEmpty()) {
|
||||
StringTokenizer st = new StringTokenizer(CR.getSearchTxt().trim(),
|
||||
" ");
|
||||
StringBuffer txt = new StringBuffer("(");
|
||||
while (st.hasMoreTokens()) {
|
||||
String token = st.nextToken();
|
||||
txt.append("(A.descrizione like '%" + token +
|
||||
"%' or A.ipAddress like '%" + token +
|
||||
"%' or A.eMail like '%" + token + "%')");
|
||||
if (st.hasMoreTokens())
|
||||
txt.append(" and ");
|
||||
}
|
||||
txt.append(")");
|
||||
wc.addWc(txt.toString());
|
||||
}
|
||||
if (CR.getFlgAttivo() == 0L) {
|
||||
wc.addWc("(A.flgAttivo is null or A.flgAttivo=0)");
|
||||
} else if (CR.getFlgAttivo() == 1L) {
|
||||
wc.addWc("A.flgAttivo =1");
|
||||
}
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(
|
||||
String.valueOf(s_Sql_Find) + wc.toString() + s_Sql_Order);
|
||||
return findRows(stmt, pageNumber, pageRows);
|
||||
} catch (SQLException e) {
|
||||
handleDebug(e);
|
||||
return AB_EMPTY_VECTUMERATOR;
|
||||
}
|
||||
}
|
||||
|
||||
public void findByIp(String l_ip) {
|
||||
String s_Sql_Find = "select A.* from BLACKLIST AS A";
|
||||
String s_Sql_Order = "";
|
||||
WcString wc = new WcString();
|
||||
wc.addWc("A.ipAddress like '" + l_ip + "%'");
|
||||
wc.addWc("A.flgAttivo=1");
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(
|
||||
String.valueOf(s_Sql_Find) + wc.toString() + s_Sql_Order);
|
||||
findFirstRecord(stmt);
|
||||
} catch (SQLException e) {
|
||||
handleDebug(e);
|
||||
}
|
||||
}
|
||||
|
||||
public void findByEmail(String l_eMail) {
|
||||
String s_Sql_Find = "select A.* from BLACKLIST AS A";
|
||||
String s_Sql_Order = "";
|
||||
WcString wc = new WcString();
|
||||
if (l_eMail.indexOf("@") > 0) {
|
||||
String temp = l_eMail.substring(l_eMail.indexOf("@"));
|
||||
wc.addWc("(A.eMail like '" + temp + "%' or A.eMail like '%" +
|
||||
l_eMail + "%')");
|
||||
} else {
|
||||
wc.addWc("A.eMail like '%" + l_eMail + "%'");
|
||||
}
|
||||
wc.addWc("A.flgAttivo=1");
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(
|
||||
String.valueOf(s_Sql_Find) + wc.toString() + s_Sql_Order);
|
||||
findFirstRecord(stmt);
|
||||
} catch (SQLException e) {
|
||||
handleDebug(e);
|
||||
}
|
||||
}
|
||||
|
||||
public String getDescrizione() {
|
||||
return (this.descrizione == null) ? "" : this.descrizione.trim();
|
||||
}
|
||||
|
||||
public String getDescrizioneCompleta() {
|
||||
StringBuffer temp = new StringBuffer();
|
||||
if (!getIpAddress().isEmpty()) {
|
||||
temp.append("Ip addr.: ");
|
||||
temp.append(getIpAddress());
|
||||
}
|
||||
if (!getEMail().isEmpty()) {
|
||||
temp.append(" Email addr.: ");
|
||||
temp.append(getEMail());
|
||||
}
|
||||
return temp.toString().trim();
|
||||
}
|
||||
|
||||
public void setDescrizione(String descrizione) {
|
||||
this.descrizione = descrizione;
|
||||
}
|
||||
}
|
||||
62
rus/WEB-INF/lib/ablia_src/com/ablia/common/BlacklistCR.java
Normal file
62
rus/WEB-INF/lib/ablia_src/com/ablia/common/BlacklistCR.java
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
package com.ablia.common;
|
||||
|
||||
import com.ablia.db.ApplParmFull;
|
||||
import com.ablia.db.CRAdapter;
|
||||
|
||||
public class BlacklistCR extends CRAdapter {
|
||||
private long id_blacklist;
|
||||
|
||||
private long flgAttivo = -1L;
|
||||
|
||||
private String ipAddress;
|
||||
|
||||
private String eMail;
|
||||
|
||||
private String descrizione;
|
||||
|
||||
public BlacklistCR(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public BlacklistCR() {}
|
||||
|
||||
public void setId_blacklist(long newId_blackList) {
|
||||
this.id_blacklist = newId_blackList;
|
||||
}
|
||||
|
||||
public void setFlgAttivo(long newFlgAttivo) {
|
||||
this.flgAttivo = newFlgAttivo;
|
||||
}
|
||||
|
||||
public void setIpAddress(String newIpAddress) {
|
||||
this.ipAddress = newIpAddress;
|
||||
}
|
||||
|
||||
public void setEMail(String newEMail) {
|
||||
this.eMail = newEMail;
|
||||
}
|
||||
|
||||
public long getId_blacklist() {
|
||||
return this.id_blacklist;
|
||||
}
|
||||
|
||||
public long getFlgAttivo() {
|
||||
return this.flgAttivo;
|
||||
}
|
||||
|
||||
public String getIpAddress() {
|
||||
return (this.ipAddress == null) ? "" : this.ipAddress.trim();
|
||||
}
|
||||
|
||||
public String getEMail() {
|
||||
return (this.eMail == null) ? "" : this.eMail.trim();
|
||||
}
|
||||
|
||||
public String getDescrizione() {
|
||||
return (this.descrizione == null) ? "" : this.descrizione.trim();
|
||||
}
|
||||
|
||||
public void setDescrizione(String descrizione) {
|
||||
this.descrizione = descrizione;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
package com.ablia.common;
|
||||
|
||||
import com.ablia.db.ApplParmFull;
|
||||
import com.ablia.db.ResParm;
|
||||
|
||||
public interface CrontabInterface {
|
||||
ResParm crontabJob(ApplParmFull paramApplParmFull);
|
||||
}
|
||||
41
rus/WEB-INF/lib/ablia_src/com/ablia/common/DescLangItem.java
Normal file
41
rus/WEB-INF/lib/ablia_src/com/ablia/common/DescLangItem.java
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
package com.ablia.common;
|
||||
|
||||
public class DescLangItem {
|
||||
private String value;
|
||||
|
||||
private String lang;
|
||||
|
||||
private String campo;
|
||||
|
||||
public DescLangItem(String campo, String lang, String value) {
|
||||
this.value = value;
|
||||
this.lang = lang;
|
||||
this.campo = campo;
|
||||
}
|
||||
|
||||
public DescLangItem() {}
|
||||
|
||||
public String getCampo() {
|
||||
return (this.campo == null) ? "" : this.campo.trim();
|
||||
}
|
||||
|
||||
public void setCampo(String newCampo) {
|
||||
this.campo = newCampo;
|
||||
}
|
||||
|
||||
public String getLang() {
|
||||
return (this.lang == null) ? "" : this.lang.trim();
|
||||
}
|
||||
|
||||
public void setLang(String newLang) {
|
||||
this.lang = newLang;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return (this.value == null) ? "" : this.value.trim();
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
}
|
||||
299
rus/WEB-INF/lib/ablia_src/com/ablia/common/DescTxtLang.java
Normal file
299
rus/WEB-INF/lib/ablia_src/com/ablia/common/DescTxtLang.java
Normal file
|
|
@ -0,0 +1,299 @@
|
|||
package com.ablia.common;
|
||||
|
||||
import com.ablia.db.ApplParmFull;
|
||||
import com.ablia.db.DBAdapter;
|
||||
import com.ablia.db.ResParm;
|
||||
import com.ablia.db.WcString;
|
||||
import com.ablia.util.StringTokenizer;
|
||||
import com.ablia.util.Vectumerator;
|
||||
import java.io.Serializable;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.Hashtable;
|
||||
|
||||
public class DescTxtLang extends DBAdapter implements Serializable {
|
||||
private static Hashtable<String, Hashtable<String, Integer>> initTableDescLangDescriptorDb;
|
||||
|
||||
private static final String _DESCRIZIONE = "descrizione";
|
||||
|
||||
private String tabella;
|
||||
|
||||
private long idTabella;
|
||||
|
||||
private String campo;
|
||||
|
||||
private String lang;
|
||||
|
||||
private String descrizione;
|
||||
|
||||
private String descrizione254;
|
||||
|
||||
public DescTxtLang(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public DescTxtLang() {}
|
||||
|
||||
public void setTabella(String newTabella) {
|
||||
this.tabella = newTabella;
|
||||
}
|
||||
|
||||
public void setIdTabella(long newIdTabella) {
|
||||
this.idTabella = newIdTabella;
|
||||
}
|
||||
|
||||
public void setCampo(String newCampo) {
|
||||
this.campo = newCampo;
|
||||
}
|
||||
|
||||
public void setLang(String newLang) {
|
||||
this.lang = newLang;
|
||||
}
|
||||
|
||||
public void setDescrizione(String newDescrizione) {
|
||||
this.descrizione = newDescrizione;
|
||||
}
|
||||
|
||||
public String getTabella() {
|
||||
return (this.tabella == null) ? "" : this.tabella.trim();
|
||||
}
|
||||
|
||||
public long getIdTabella() {
|
||||
return this.idTabella;
|
||||
}
|
||||
|
||||
public String getCampo() {
|
||||
return (this.campo == null) ? "" : this.campo.trim();
|
||||
}
|
||||
|
||||
public String getLang() {
|
||||
return (this.lang == null) ? "" : this.lang.trim();
|
||||
}
|
||||
|
||||
public String getDescrizioneScript() {
|
||||
return DBAdapter.prepareScriptString(getDescrizione(), true, false);
|
||||
}
|
||||
|
||||
protected ResParm checkDeleteCascade() {
|
||||
return new ResParm(true);
|
||||
}
|
||||
|
||||
protected void deleteCascade() {}
|
||||
|
||||
public Vectumerator findByCR(DescTxtLangCR CR, int pageNumber, int pageRows) {
|
||||
String s_Sql_Find = "select A.* from DESC_TXT_LANG AS A";
|
||||
String s_Sql_Order = "";
|
||||
WcString wc = new WcString();
|
||||
if (!CR.getSearchTxt().trim().isEmpty()) {
|
||||
StringTokenizer st = new StringTokenizer(CR.getSearchTxt().trim(), " ");
|
||||
StringBuffer txt = new StringBuffer("(");
|
||||
while (st.hasMoreTokens()) {
|
||||
String token = st.nextToken();
|
||||
txt.append("(A.Cognome like '%" + token + "%' or A.Nome like '%" + token + "%')");
|
||||
if (st.hasMoreTokens())
|
||||
txt.append(" and ");
|
||||
}
|
||||
txt.append(")");
|
||||
wc.addWc(txt.toString());
|
||||
}
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(String.valueOf(s_Sql_Find) + wc.toString() + s_Sql_Order);
|
||||
return findRows(stmt, pageNumber, pageRows);
|
||||
} catch (SQLException e) {
|
||||
removeCPConnection();
|
||||
handleDebug(e);
|
||||
return AB_EMPTY_VECTUMERATOR;
|
||||
}
|
||||
}
|
||||
|
||||
public String getDescrizione254() {
|
||||
return (this.descrizione254 == null) ? "" : this.descrizione254.trim();
|
||||
}
|
||||
|
||||
public void setDescrizione254(String descrizione254) {
|
||||
this.descrizione254 = descrizione254;
|
||||
}
|
||||
|
||||
public String getDescrizione() {
|
||||
return (this.descrizione == null) ? "" : this.descrizione.trim();
|
||||
}
|
||||
|
||||
public String getDescrizione254Script() {
|
||||
return DBAdapter.prepareScriptString(getDescrizione254(), true, false);
|
||||
}
|
||||
|
||||
public void findByIdtabellaLangTabellaCampo(long l_idTabella, String l_lang, String l_tabella, String l_campo) {
|
||||
String s_Sql_Find = "select A.* from DESC_TXT_LANG AS A";
|
||||
String s_Sql_Order = "";
|
||||
WcString wc = new WcString();
|
||||
wc.addWc("A.idTabella=" + l_idTabella);
|
||||
wc.addWc("A.lang='" + l_lang + "'");
|
||||
wc.addWc("A.tabella='" + l_tabella + "'");
|
||||
wc.addWc("A.campo='" + l_campo + "'");
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(String.valueOf(s_Sql_Find) + wc.toString() + s_Sql_Order);
|
||||
findFirstRecord(stmt);
|
||||
} catch (SQLException e) {
|
||||
removeCPConnection();
|
||||
handleDebug(e);
|
||||
}
|
||||
}
|
||||
|
||||
public Vectumerator<DescTxtLang> findCampiByIdtabellaLangTabella(long l_idTabella, String l_lang, String l_tabella) {
|
||||
String s_Sql_Find = "select A.* from DESC_TXT_LANG AS A";
|
||||
String s_Sql_Order = "";
|
||||
WcString wc = new WcString();
|
||||
wc.addWc("A.idTabella=" + l_idTabella);
|
||||
wc.addWc("A.lang='" + l_lang + "'");
|
||||
wc.addWc("A.tabella='" + l_tabella + "'");
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(String.valueOf(s_Sql_Find) + wc.toString() + s_Sql_Order);
|
||||
return (Vectumerator)findRows(stmt);
|
||||
} catch (SQLException e) {
|
||||
removeCPConnection();
|
||||
handleDebug(e);
|
||||
return (Vectumerator)AB_EMPTY_VECTUMERATOR;
|
||||
}
|
||||
}
|
||||
|
||||
protected final int getStringValueCase(String l_columnName) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public Vectumerator<? extends DBAdapter> findCampiTabella(String l_tabella) {
|
||||
String s_Sql_Find = "select distinct A.campo from DESC_TXT_LANG AS A";
|
||||
String s_Sql_Order = "";
|
||||
WcString wc = new WcString();
|
||||
wc.addWc("A.tabella='" + l_tabella + "'");
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(String.valueOf(s_Sql_Find) + wc.toString() + s_Sql_Order);
|
||||
return findRows(stmt);
|
||||
} catch (SQLException e) {
|
||||
removeCPConnection();
|
||||
handleDebug(e);
|
||||
return AB_EMPTY_VECTUMERATOR;
|
||||
}
|
||||
}
|
||||
|
||||
public ResParm deleteByTabellaIdtabella(String l_tabella, long l_id_tabella) {
|
||||
String s_Sql_Find = "delete from DESC_TXT_LANG ";
|
||||
WcString wc = new WcString();
|
||||
wc.addWc("tabella='" + l_tabella + "'");
|
||||
wc.addWc("idTabella=" + l_id_tabella);
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(String.valueOf(s_Sql_Find) + wc.toString());
|
||||
return delete(stmt);
|
||||
} catch (SQLException e) {
|
||||
removeCPConnection();
|
||||
handleDebug(e);
|
||||
return new ResParm(false, e);
|
||||
}
|
||||
}
|
||||
|
||||
public Vectumerator findAllTxtByIdLangTable(long l_idTabella, String l_lang, String l_tabella) {
|
||||
String s_Sql_Find = "select A.* from DESC_TXT_LANG AS A";
|
||||
String s_Sql_Order = "";
|
||||
WcString wc = new WcString();
|
||||
wc.addWc("A.idTabella=" + l_idTabella);
|
||||
if (!l_lang.isEmpty())
|
||||
wc.addWc("A.lang='" + l_lang + "'");
|
||||
wc.addWc("A.tabella='" + l_tabella + "'");
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(String.valueOf(s_Sql_Find) + wc.toString() + s_Sql_Order);
|
||||
return findRows(stmt);
|
||||
} catch (SQLException e) {
|
||||
removeCPConnection();
|
||||
handleDebug(e);
|
||||
return AB_EMPTY_VECTUMERATOR;
|
||||
}
|
||||
}
|
||||
|
||||
public static void resetHashtables() {
|
||||
if (initTableDescLangDescriptorDb != null) {
|
||||
initTableDescLangDescriptorDb.clear();
|
||||
initTableDescLangDescriptorDb = null;
|
||||
}
|
||||
}
|
||||
|
||||
private static Hashtable<String, Hashtable<String, Integer>> getInitTableDescLangDescriptorDb() {
|
||||
if (initTableDescLangDescriptorDb == null)
|
||||
initTableDescLangDescriptorDb = new Hashtable<>();
|
||||
return initTableDescLangDescriptorDb;
|
||||
}
|
||||
|
||||
protected void fillFields(ResultSet rst) {
|
||||
super.fillFields(rst);
|
||||
int l_stringCaseValue = 0;
|
||||
Hashtable<String, Integer> columnDescriptorHT = getInitTableDescLangDescriptorDb().get(String.valueOf(getTabella()) + getApFull().getApCode());
|
||||
if (columnDescriptorHT != null && columnDescriptorHT.containsKey(getCampo())) {
|
||||
l_stringCaseValue = columnDescriptorHT.get(getCampo());
|
||||
} else {
|
||||
Access access = new Access(getApFull());
|
||||
access.findByPrimaryKey(getTabella());
|
||||
l_stringCaseValue = access.getTableColumnStringValueCase(getCampo());
|
||||
if (columnDescriptorHT == null)
|
||||
columnDescriptorHT = new Hashtable<>();
|
||||
columnDescriptorHT.put(getCampo(), Integer.valueOf(l_stringCaseValue));
|
||||
getInitTableDescLangDescriptorDb().put(String.valueOf(getTabella()) + getApFull().getApCode(), columnDescriptorHT);
|
||||
}
|
||||
if (l_stringCaseValue != 0) {
|
||||
String temp;
|
||||
switch (l_stringCaseValue) {
|
||||
case 1:
|
||||
temp = getDescrizione();
|
||||
if (temp != null) {
|
||||
temp = temp.toUpperCase();
|
||||
temp = temp.replaceAll("&EURO;", "€");
|
||||
}
|
||||
setDescrizione(temp);
|
||||
temp = getDescrizione254();
|
||||
if (temp != null) {
|
||||
temp = temp.toUpperCase();
|
||||
temp = temp.replaceAll("&EURO;", "€");
|
||||
}
|
||||
setDescrizione254(temp);
|
||||
break;
|
||||
case 2:
|
||||
temp = getDescrizione();
|
||||
if (temp != null)
|
||||
temp = temp.toLowerCase();
|
||||
setDescrizione(temp);
|
||||
temp = getDescrizione254();
|
||||
if (temp != null)
|
||||
temp = temp.toLowerCase();
|
||||
setDescrizione254(temp);
|
||||
break;
|
||||
case 3:
|
||||
temp = getDescrizione();
|
||||
if (temp != null)
|
||||
temp = convertTo1stCap(temp);
|
||||
setDescrizione(temp);
|
||||
temp = getDescrizione254();
|
||||
if (temp != null)
|
||||
temp = temp.toLowerCase();
|
||||
setDescrizione254(temp);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected final int getStringValueCaseOLD(String l_columnName) {
|
||||
if (getTabella().isEmpty() || !l_columnName.startsWith("descrizione"))
|
||||
return 0;
|
||||
int l_stringCaseValue = 0;
|
||||
Hashtable<String, Integer> columnDescriptorHT = getInitTableDescLangDescriptorDb().get(String.valueOf(getTabella()) + getApFull().getApCode());
|
||||
if (columnDescriptorHT != null && columnDescriptorHT.containsKey(getCampo())) {
|
||||
l_stringCaseValue = columnDescriptorHT.get(getCampo());
|
||||
} else {
|
||||
Access access = new Access(getApFull());
|
||||
access.findByPrimaryKey(getTabella());
|
||||
l_stringCaseValue = access.getTableColumnStringValueCase(getCampo());
|
||||
if (columnDescriptorHT == null)
|
||||
columnDescriptorHT = new Hashtable<>();
|
||||
columnDescriptorHT.put(getCampo(), Integer.valueOf(l_stringCaseValue));
|
||||
getInitTableDescLangDescriptorDb().put(String.valueOf(getTabella()) + getApFull().getApCode(), columnDescriptorHT);
|
||||
}
|
||||
return l_stringCaseValue;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
package com.ablia.common;
|
||||
|
||||
import com.ablia.db.ApplParmFull;
|
||||
import com.ablia.db.CRAdapter;
|
||||
|
||||
public class DescTxtLangCR extends CRAdapter {
|
||||
private String tabella;
|
||||
|
||||
private long idTabella;
|
||||
|
||||
private String campo;
|
||||
|
||||
private String lang;
|
||||
|
||||
private String descrizione;
|
||||
|
||||
public DescTxtLangCR(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public DescTxtLangCR() {}
|
||||
|
||||
public void setTabella(String newTabella) {
|
||||
this.tabella = newTabella;
|
||||
}
|
||||
|
||||
public void setIdTabella(long newIdTabella) {
|
||||
this.idTabella = newIdTabella;
|
||||
}
|
||||
|
||||
public void setCampo(String newCampo) {
|
||||
this.campo = newCampo;
|
||||
}
|
||||
|
||||
public void setLang(String newLang) {
|
||||
this.lang = newLang;
|
||||
}
|
||||
|
||||
public void setDescrizione(String newDescrizione) {
|
||||
this.descrizione = newDescrizione;
|
||||
}
|
||||
|
||||
public String getTabella() {
|
||||
return (this.tabella == null) ? "" : this.tabella.trim();
|
||||
}
|
||||
|
||||
public long getIdTabella() {
|
||||
return this.idTabella;
|
||||
}
|
||||
|
||||
public String getCampo() {
|
||||
return (this.campo == null) ? "" : this.campo.trim();
|
||||
}
|
||||
|
||||
public String getLang() {
|
||||
return (this.lang == null) ? "" : this.lang.trim();
|
||||
}
|
||||
|
||||
public String getDescrizione() {
|
||||
return (this.descrizione == null) ? "" : this.descrizione.trim();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
package com.ablia.common;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class DescTxtLangKey implements Serializable {
|
||||
private String tabella;
|
||||
|
||||
private long idTabella;
|
||||
|
||||
private String campo;
|
||||
|
||||
private String lang;
|
||||
|
||||
public DescTxtLangKey() {}
|
||||
|
||||
public DescTxtLangKey(String newTabella, long newIdTabella, String newCampo, String newLang) {
|
||||
setTabella(newTabella);
|
||||
setIdTabella(newIdTabella);
|
||||
setCampo(newCampo);
|
||||
setLang(newLang);
|
||||
}
|
||||
|
||||
public void setTabella(String newTabella) {
|
||||
this.tabella = newTabella;
|
||||
}
|
||||
|
||||
public void setIdTabella(long newIdTabella) {
|
||||
this.idTabella = newIdTabella;
|
||||
}
|
||||
|
||||
public void setCampo(String newCampo) {
|
||||
this.campo = newCampo;
|
||||
}
|
||||
|
||||
public void setLang(String newLang) {
|
||||
this.lang = newLang;
|
||||
}
|
||||
|
||||
public String getTabella() {
|
||||
return (this.tabella == null) ? "" : this.tabella.trim();
|
||||
}
|
||||
|
||||
public long getIdTabella() {
|
||||
return this.idTabella;
|
||||
}
|
||||
|
||||
public String getCampo() {
|
||||
return (this.campo == null) ? "" : this.campo.trim();
|
||||
}
|
||||
|
||||
public String getLang() {
|
||||
return (this.lang == null) ? "" : this.lang.trim();
|
||||
}
|
||||
}
|
||||
57
rus/WEB-INF/lib/ablia_src/com/ablia/common/Dictionary.java
Normal file
57
rus/WEB-INF/lib/ablia_src/com/ablia/common/Dictionary.java
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
package com.ablia.common;
|
||||
|
||||
import com.ablia.db.ApplParmFull;
|
||||
import com.ablia.db.DBAdapter;
|
||||
import com.ablia.db.ResParm;
|
||||
import java.io.Serializable;
|
||||
|
||||
public class Dictionary extends DBAdapter implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String id_dictionary;
|
||||
|
||||
private String id_language;
|
||||
|
||||
private String descrizione;
|
||||
|
||||
public Dictionary() {
|
||||
initFields();
|
||||
}
|
||||
|
||||
public Dictionary(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
protected ResParm checkDeleteCascade() {
|
||||
return new ResParm(true);
|
||||
}
|
||||
|
||||
protected void deleteCascade() {}
|
||||
|
||||
public String getDescrizione() {
|
||||
return (this.descrizione == null) ? "" :
|
||||
this.descrizione;
|
||||
}
|
||||
|
||||
public String getId_dictionary() {
|
||||
return (this.id_dictionary == null) ? "" :
|
||||
this.id_dictionary;
|
||||
}
|
||||
|
||||
public String getId_language() {
|
||||
return (this.id_language == null) ? "" :
|
||||
this.id_language;
|
||||
}
|
||||
|
||||
public void setDescrizione(String newDescrizione) {
|
||||
this.descrizione = newDescrizione;
|
||||
}
|
||||
|
||||
public void setId_dictionary(String newId_dictionary) {
|
||||
this.id_dictionary = newId_dictionary;
|
||||
}
|
||||
|
||||
public void setId_language(String newId_language) {
|
||||
this.id_language = newId_language;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
package com.ablia.common;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class DictionaryKey implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String id_dictionary;
|
||||
|
||||
private String id_language;
|
||||
|
||||
public String getId_dictionary() {
|
||||
return this.id_dictionary;
|
||||
}
|
||||
|
||||
public String getId_language() {
|
||||
return this.id_language;
|
||||
}
|
||||
|
||||
public void setId_dictionary(String newId_dictionary) {
|
||||
this.id_dictionary = newId_dictionary;
|
||||
}
|
||||
|
||||
public void setId_language(String newId_language) {
|
||||
this.id_language = newId_language;
|
||||
}
|
||||
}
|
||||
212
rus/WEB-INF/lib/ablia_src/com/ablia/common/DittaCR.java
Normal file
212
rus/WEB-INF/lib/ablia_src/com/ablia/common/DittaCR.java
Normal file
|
|
@ -0,0 +1,212 @@
|
|||
package com.ablia.common;
|
||||
|
||||
import com.ablia.db.ApplParmFull;
|
||||
import com.ablia.db.CRAdapter;
|
||||
|
||||
public class DittaCR extends CRAdapter {
|
||||
private String cognome;
|
||||
|
||||
private String nome;
|
||||
|
||||
private String indirizzo;
|
||||
|
||||
private String numeroCivico;
|
||||
|
||||
private String descrizioneComune;
|
||||
|
||||
private String provinciaComune;
|
||||
|
||||
private String capComune;
|
||||
|
||||
private String capZona;
|
||||
|
||||
private String descrizioneNazione;
|
||||
|
||||
private String codFisc;
|
||||
|
||||
private String pIva;
|
||||
|
||||
private String eMail;
|
||||
|
||||
private String eMailAmm;
|
||||
|
||||
private String cellulare;
|
||||
|
||||
private String telefono;
|
||||
|
||||
private String telefonoAmm;
|
||||
|
||||
private String fax;
|
||||
|
||||
private String nota;
|
||||
|
||||
private String imgTmst;
|
||||
|
||||
private long id_ditta;
|
||||
|
||||
public DittaCR(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public DittaCR() {}
|
||||
|
||||
public void setCognome(String newCognome) {
|
||||
this.cognome = newCognome;
|
||||
}
|
||||
|
||||
public void setNome(String newNome) {
|
||||
this.nome = newNome;
|
||||
}
|
||||
|
||||
public void setIndirizzo(String newIndirizzo) {
|
||||
this.indirizzo = newIndirizzo;
|
||||
}
|
||||
|
||||
public void setNumeroCivico(String newNumeroCivico) {
|
||||
this.numeroCivico = newNumeroCivico;
|
||||
}
|
||||
|
||||
public void setDescrizioneComune(String newDescrizioneComune) {
|
||||
this.descrizioneComune = newDescrizioneComune;
|
||||
}
|
||||
|
||||
public void setProvinciaComune(String newProvinciaComune) {
|
||||
this.provinciaComune = newProvinciaComune;
|
||||
}
|
||||
|
||||
public void setCapComune(String newCapComune) {
|
||||
this.capComune = newCapComune;
|
||||
}
|
||||
|
||||
public void setCapZona(String newCapZona) {
|
||||
this.capZona = newCapZona;
|
||||
}
|
||||
|
||||
public void setDescrizioneNazione(String newDescrizioneNazione) {
|
||||
this.descrizioneNazione = newDescrizioneNazione;
|
||||
}
|
||||
|
||||
public void setCodFisc(String newCodFisc) {
|
||||
this.codFisc = newCodFisc;
|
||||
}
|
||||
|
||||
public void setPIva(String newPIva) {
|
||||
this.pIva = newPIva;
|
||||
}
|
||||
|
||||
public void setEMail(String newEMail) {
|
||||
this.eMail = newEMail;
|
||||
}
|
||||
|
||||
public void setEMailAmm(String newEMailAmm) {
|
||||
this.eMailAmm = newEMailAmm;
|
||||
}
|
||||
|
||||
public void setCellulare(String newCellulare) {
|
||||
this.cellulare = newCellulare;
|
||||
}
|
||||
|
||||
public void setTelefono(String newTelefono) {
|
||||
this.telefono = newTelefono;
|
||||
}
|
||||
|
||||
public void setTelefonoAmm(String newTelefonoAmm) {
|
||||
this.telefonoAmm = newTelefonoAmm;
|
||||
}
|
||||
|
||||
public void setFax(String newFax) {
|
||||
this.fax = newFax;
|
||||
}
|
||||
|
||||
public void setNota(String newNota) {
|
||||
this.nota = newNota;
|
||||
}
|
||||
|
||||
public void setImgTmst(String newImgTmst) {
|
||||
this.imgTmst = newImgTmst;
|
||||
}
|
||||
|
||||
public String getCognome() {
|
||||
return (this.cognome == null) ? "" : this.cognome.trim();
|
||||
}
|
||||
|
||||
public String getNome() {
|
||||
return (this.nome == null) ? "" : this.nome.trim();
|
||||
}
|
||||
|
||||
public String getIndirizzo() {
|
||||
return (this.indirizzo == null) ? "" : this.indirizzo.trim();
|
||||
}
|
||||
|
||||
public String getNumeroCivico() {
|
||||
return (this.numeroCivico == null) ? "" : this.numeroCivico.trim();
|
||||
}
|
||||
|
||||
public String getDescrizioneComune() {
|
||||
return (this.descrizioneComune == null) ? "" : this.descrizioneComune.trim();
|
||||
}
|
||||
|
||||
public String getProvinciaComune() {
|
||||
return (this.provinciaComune == null) ? "" : this.provinciaComune.trim();
|
||||
}
|
||||
|
||||
public String getCapComune() {
|
||||
return (this.capComune == null) ? "" : this.capComune.trim();
|
||||
}
|
||||
|
||||
public String getCapZona() {
|
||||
return (this.capZona == null) ? "" : this.capZona.trim();
|
||||
}
|
||||
|
||||
public String getDescrizioneNazione() {
|
||||
return (this.descrizioneNazione == null) ? "" : this.descrizioneNazione.trim();
|
||||
}
|
||||
|
||||
public String getCodFisc() {
|
||||
return (this.codFisc == null) ? "" : this.codFisc.trim();
|
||||
}
|
||||
|
||||
public String getPIva() {
|
||||
return (this.pIva == null) ? "" : this.pIva.trim();
|
||||
}
|
||||
|
||||
public String getEMail() {
|
||||
return (this.eMail == null) ? "" : this.eMail.trim();
|
||||
}
|
||||
|
||||
public String getEMailAmm() {
|
||||
return (this.eMailAmm == null) ? "" : this.eMailAmm.trim();
|
||||
}
|
||||
|
||||
public String getCellulare() {
|
||||
return (this.cellulare == null) ? "" : this.cellulare.trim();
|
||||
}
|
||||
|
||||
public String getTelefono() {
|
||||
return (this.telefono == null) ? "" : this.telefono.trim();
|
||||
}
|
||||
|
||||
public String getTelefonoAmm() {
|
||||
return (this.telefonoAmm == null) ? "" : this.telefonoAmm.trim();
|
||||
}
|
||||
|
||||
public String getFax() {
|
||||
return (this.fax == null) ? "" : this.fax.trim();
|
||||
}
|
||||
|
||||
public String getNota() {
|
||||
return (this.nota == null) ? "" : this.nota.trim();
|
||||
}
|
||||
|
||||
public String getImgTmst() {
|
||||
return (this.imgTmst == null) ? "" : this.imgTmst.trim();
|
||||
}
|
||||
|
||||
public long getId_ditta() {
|
||||
return this.id_ditta;
|
||||
}
|
||||
|
||||
public void setId_ditta(long id_ditta) {
|
||||
this.id_ditta = id_ditta;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
package com.ablia.common;
|
||||
|
||||
public class JsonUploadFileResponse {
|
||||
private String fileName;
|
||||
|
||||
private String fileNameLink;
|
||||
|
||||
private String message;
|
||||
|
||||
private boolean result;
|
||||
|
||||
public JsonUploadFileResponse() {}
|
||||
|
||||
public JsonUploadFileResponse(boolean result, String message, String fileName, String fileNameLink) {
|
||||
this.result = result;
|
||||
this.message = message;
|
||||
this.fileName = fileName;
|
||||
this.fileNameLink = fileNameLink;
|
||||
}
|
||||
|
||||
public String getFileName() {
|
||||
return this.fileName;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return this.message;
|
||||
}
|
||||
|
||||
public void setFileName(String imgPath) {
|
||||
this.fileName = imgPath;
|
||||
}
|
||||
|
||||
public void setMessage(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public boolean isResult() {
|
||||
return this.result;
|
||||
}
|
||||
|
||||
public void setResult(boolean result) {
|
||||
this.result = result;
|
||||
}
|
||||
|
||||
public String getFileNameLink() {
|
||||
return this.fileNameLink;
|
||||
}
|
||||
|
||||
public void setFileNameLink(String fileNameLink) {
|
||||
this.fileNameLink = fileNameLink;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
package com.ablia.common;
|
||||
|
||||
public class JsonUploadImageResponse {
|
||||
private String imgPath;
|
||||
|
||||
private String message;
|
||||
|
||||
private boolean result;
|
||||
|
||||
public JsonUploadImageResponse() {}
|
||||
|
||||
public JsonUploadImageResponse(boolean result, String message, String imgpath) {
|
||||
this.result = result;
|
||||
this.message = message;
|
||||
this.imgPath = imgpath;
|
||||
}
|
||||
|
||||
public String getImgPath() {
|
||||
return this.imgPath;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return this.message;
|
||||
}
|
||||
|
||||
public void setImgPath(String imgPath) {
|
||||
this.imgPath = imgPath;
|
||||
}
|
||||
|
||||
public void setMessage(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public boolean isResult() {
|
||||
return this.result;
|
||||
}
|
||||
|
||||
public void setResult(boolean result) {
|
||||
this.result = result;
|
||||
}
|
||||
}
|
||||
39
rus/WEB-INF/lib/ablia_src/com/ablia/common/Lang.java
Normal file
39
rus/WEB-INF/lib/ablia_src/com/ablia/common/Lang.java
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
package com.ablia.common;
|
||||
|
||||
import com.ablia.db.ApplParmFull;
|
||||
import com.ablia.db.DBAdapter;
|
||||
import com.ablia.db.DBAdapterException;
|
||||
import com.ablia.db.ResParm;
|
||||
import com.ablia.util.StringTokenizer;
|
||||
import com.ablia.util.Vectumerator;
|
||||
import java.sql.SQLException;
|
||||
|
||||
public class Lang extends DBAdapter {
|
||||
private String lang;
|
||||
|
||||
protected void deleteCascade() {}
|
||||
|
||||
public static Vectumerator<Lang> findAllLangAvailable(ApplParmFull ap) {
|
||||
Vectumerator<Lang> vec = new Vectumerator<>();
|
||||
String lingue = ap.getParm("LANG_AVAILABLE").getTesto();
|
||||
StringTokenizer st = new StringTokenizer(lingue, ",");
|
||||
while (st.hasMoreTokens()) {
|
||||
Lang lg = new Lang();
|
||||
lg.setLang(st.nextToken());
|
||||
vec.add(lg);
|
||||
}
|
||||
return vec;
|
||||
}
|
||||
|
||||
protected ResParm checkDeleteCascade() throws DBAdapterException, SQLException {
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getLang() {
|
||||
return (this.lang == null) ? "" : this.lang;
|
||||
}
|
||||
|
||||
public void setLang(String lang) {
|
||||
this.lang = lang;
|
||||
}
|
||||
}
|
||||
1711
rus/WEB-INF/lib/ablia_src/com/ablia/common/Parm.java
Normal file
1711
rus/WEB-INF/lib/ablia_src/com/ablia/common/Parm.java
Normal file
File diff suppressed because it is too large
Load diff
73
rus/WEB-INF/lib/ablia_src/com/ablia/common/ParmCR.java
Normal file
73
rus/WEB-INF/lib/ablia_src/com/ablia/common/ParmCR.java
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
package com.ablia.common;
|
||||
|
||||
import com.ablia.db.ApplParmFull;
|
||||
import com.ablia.db.CRAdapter;
|
||||
|
||||
public class ParmCR extends CRAdapter {
|
||||
private String tipoParm;
|
||||
|
||||
private long id_userProfile;
|
||||
|
||||
private long id_user;
|
||||
|
||||
public ParmCR() {}
|
||||
|
||||
public ParmCR(ApplParmFull newAp) {
|
||||
setApFull(newAp);
|
||||
}
|
||||
|
||||
public String getTipoParm() {
|
||||
return (this.tipoParm == null) ? "" :
|
||||
this.tipoParm;
|
||||
}
|
||||
|
||||
public void setTipoParm(String newTxtRicerca) {
|
||||
this.tipoParm = newTxtRicerca;
|
||||
}
|
||||
|
||||
private long flgAdmin = -1L;
|
||||
|
||||
private long flgTipo = -1L;
|
||||
|
||||
private long id_parm;
|
||||
|
||||
public long getId_user() {
|
||||
return this.id_user;
|
||||
}
|
||||
|
||||
public void setId_user(long id_user) {
|
||||
this.id_user = id_user;
|
||||
}
|
||||
|
||||
public long getId_userProfile() {
|
||||
return this.id_userProfile;
|
||||
}
|
||||
|
||||
public void setId_userProfile(long id_userProfile) {
|
||||
this.id_userProfile = id_userProfile;
|
||||
}
|
||||
|
||||
public long getFlgAdmin() {
|
||||
return this.flgAdmin;
|
||||
}
|
||||
|
||||
public void setFlgAdmin(long flgAdmin) {
|
||||
this.flgAdmin = flgAdmin;
|
||||
}
|
||||
|
||||
public long getFlgTipo() {
|
||||
return this.flgTipo;
|
||||
}
|
||||
|
||||
public void setFlgTipo(long flgTipo) {
|
||||
this.flgTipo = flgTipo;
|
||||
}
|
||||
|
||||
public long getId_parm() {
|
||||
return this.id_parm;
|
||||
}
|
||||
|
||||
public void setId_parm(long id_parm) {
|
||||
this.id_parm = id_parm;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,113 @@
|
|||
package com.ablia.common;
|
||||
|
||||
import com.lowagie.text.Document;
|
||||
import com.lowagie.text.Image;
|
||||
import com.lowagie.text.PageSize;
|
||||
import com.lowagie.text.Paragraph;
|
||||
import com.lowagie.text.Rectangle;
|
||||
import com.lowagie.text.pdf.PdfContentByte;
|
||||
import com.lowagie.text.pdf.PdfPageEvent;
|
||||
import com.lowagie.text.pdf.PdfWriter;
|
||||
import java.awt.Color;
|
||||
|
||||
public class PdfWatermarkEvent implements PdfPageEvent {
|
||||
private String wmFileName;
|
||||
|
||||
public PdfWatermarkEvent(String wmFileName, boolean printMiddleDash, Rectangle l_pageSize) {
|
||||
this.wmFileName = wmFileName;
|
||||
this.printMiddleDash = printMiddleDash;
|
||||
setPageSize(this.pageSize);
|
||||
}
|
||||
|
||||
public PdfWatermarkEvent(String wmFileName, boolean printMiddleDash) {
|
||||
this.wmFileName = wmFileName;
|
||||
this.printMiddleDash = printMiddleDash;
|
||||
}
|
||||
|
||||
public void onChapter(PdfWriter arg0, Document arg1, float arg2, Paragraph arg3) {}
|
||||
|
||||
public void onChapterEnd(PdfWriter arg0, Document arg1, float arg2) {}
|
||||
|
||||
public void onCloseDocument(PdfWriter arg0, Document arg1) {}
|
||||
|
||||
public void onEndPage(PdfWriter arg0, Document arg1) {}
|
||||
|
||||
public void onGenericTag(PdfWriter arg0, Document arg1, Rectangle arg2, String arg3) {}
|
||||
|
||||
public void onOpenDocument(PdfWriter arg0, Document arg1) {}
|
||||
|
||||
public void onParagraph(PdfWriter arg0, Document arg1, float arg2) {}
|
||||
|
||||
public void onParagraphEnd(PdfWriter arg0, Document arg1, float arg2) {}
|
||||
|
||||
public void onSection(PdfWriter arg0, Document arg1, float arg2, int arg3, Paragraph arg4) {}
|
||||
|
||||
public void onSectionEnd(PdfWriter arg0, Document arg1, float arg2) {}
|
||||
|
||||
public void onStartPage(PdfWriter writer, Document arg1) {
|
||||
if (isPrintMiddleDash()) {
|
||||
float middleY = getPageSize().getHeight() / 2.0F;
|
||||
PdfContentByte cb = writer.getDirectContent();
|
||||
cb.moveTo(0.0F, middleY);
|
||||
cb.setLineDash(5.0F, 5.0F, 10.0F);
|
||||
cb.setLineWidth(0.5F);
|
||||
cb.setColorStroke(Color.gray);
|
||||
cb.lineTo(getPageSize().getWidth(), middleY);
|
||||
cb.stroke();
|
||||
}
|
||||
if (!getWmFileName().isEmpty()) {
|
||||
PdfContentByte cb = writer.getDirectContent();
|
||||
try {
|
||||
Image wmImage = Image.getInstance(getWmFileName());
|
||||
wmImage.setRotationDegrees(45.0F);
|
||||
wmImage.scaleToFit(
|
||||
wmImage.getHeight() * 30.0F / wmImage.getHeight(), 30.0F);
|
||||
float newH = 30.0F;
|
||||
float newW = wmImage.getHeight() * newH / wmImage.getHeight();
|
||||
int nCol = 3;
|
||||
int nRow = 6;
|
||||
float xStep = (getPageSize().getWidth() - 2.0F * newW) / (float)nCol;
|
||||
float yStep = (getPageSize().getHeight() - 2.0F * newH) / (float)nRow;
|
||||
for (int i = 0; i < nCol; i++) {
|
||||
for (int j = 0; j < nRow; j++) {
|
||||
float x = (float)((double)i + 0.5D) * xStep;
|
||||
float y = (float)((double)j + 0.5D) * yStep;
|
||||
wmImage.setAbsolutePosition(x, y);
|
||||
cb.addImage(wmImage);
|
||||
}
|
||||
}
|
||||
cb.stroke();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private boolean printMiddleDash = false;
|
||||
|
||||
private Rectangle pageSize;
|
||||
|
||||
public String getWmFileName() {
|
||||
return (this.wmFileName == null) ? "" : this.wmFileName;
|
||||
}
|
||||
|
||||
public void setWmFileName(String wmFileName) {
|
||||
this.wmFileName = wmFileName;
|
||||
}
|
||||
|
||||
public boolean isPrintMiddleDash() {
|
||||
return this.printMiddleDash;
|
||||
}
|
||||
|
||||
public void setPrintMiddleDash(boolean printMiddleDash) {
|
||||
this.printMiddleDash = printMiddleDash;
|
||||
}
|
||||
|
||||
public Rectangle getPageSize() {
|
||||
return (this.pageSize == null) ? PageSize.A4 : this.pageSize;
|
||||
}
|
||||
|
||||
public void setPageSize(Rectangle pageSize) {
|
||||
this.pageSize = pageSize;
|
||||
}
|
||||
}
|
||||
156
rus/WEB-INF/lib/ablia_src/com/ablia/common/Postazione.java
Normal file
156
rus/WEB-INF/lib/ablia_src/com/ablia/common/Postazione.java
Normal file
|
|
@ -0,0 +1,156 @@
|
|||
package com.ablia.common;
|
||||
|
||||
import com.ablia.db.ApplParmFull;
|
||||
import com.ablia.db.DBAdapter;
|
||||
import com.ablia.db.ResParm;
|
||||
import com.ablia.db.WcString;
|
||||
import com.ablia.util.StringTokenizer;
|
||||
import com.ablia.util.Vectumerator;
|
||||
import java.io.Serializable;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.SQLException;
|
||||
|
||||
public class Postazione extends DBAdapter implements PostazioneI, Serializable {
|
||||
private static final long serialVersionUID = 7416669184945044393L;
|
||||
|
||||
private long id_postazione;
|
||||
|
||||
private String descrizione;
|
||||
|
||||
private String ipAddress;
|
||||
|
||||
private String stampanteA4;
|
||||
|
||||
private String stampanteEtichette;
|
||||
|
||||
private long flgTipo;
|
||||
|
||||
private String hostname;
|
||||
|
||||
public Postazione(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public Postazione() {}
|
||||
|
||||
public void setId_postazione(long newId_postazione) {
|
||||
this.id_postazione = newId_postazione;
|
||||
}
|
||||
|
||||
public void setDescrizione(String newDescrizione) {
|
||||
this.descrizione = newDescrizione;
|
||||
}
|
||||
|
||||
public void setIpAddress(String newIpAddress) {
|
||||
this.ipAddress = newIpAddress;
|
||||
}
|
||||
|
||||
public void setStampanteA4(String newStampanteLaser) {
|
||||
this.stampanteA4 = newStampanteLaser;
|
||||
}
|
||||
|
||||
public void setStampanteEtichette(String newStampanteEtichette) {
|
||||
this.stampanteEtichette = newStampanteEtichette;
|
||||
}
|
||||
|
||||
public long getId_postazione() {
|
||||
return this.id_postazione;
|
||||
}
|
||||
|
||||
public String getDescrizione() {
|
||||
return (this.descrizione == null) ? "" : this.descrizione.trim();
|
||||
}
|
||||
|
||||
public String getIpAddress() {
|
||||
return (this.ipAddress == null) ? "" : this.ipAddress.trim();
|
||||
}
|
||||
|
||||
public String getStampanteA4() {
|
||||
return (this.stampanteA4 == null) ? "" : this.stampanteA4.trim();
|
||||
}
|
||||
|
||||
public String getStampanteEtichette() {
|
||||
return (this.stampanteEtichette == null) ? "" : this.stampanteEtichette.trim();
|
||||
}
|
||||
|
||||
protected ResParm checkDeleteCascade() {
|
||||
return new ResParm(true);
|
||||
}
|
||||
|
||||
protected void deleteCascade() {}
|
||||
|
||||
public Vectumerator findByCR(PostazioneCR CR, int pageNumber, int pageRows) {
|
||||
String s_Sql_Find = "select A.* from POSTAZIONE AS A";
|
||||
String s_Sql_Order = " order By A.descrizione";
|
||||
WcString wc = new WcString();
|
||||
if (!CR.getSearchTxt().trim().isEmpty()) {
|
||||
StringTokenizer st = new StringTokenizer(CR.getSearchTxt().trim(), " ");
|
||||
StringBuffer txt = new StringBuffer("(");
|
||||
while (st.hasMoreTokens()) {
|
||||
String token = st.nextToken();
|
||||
txt.append("(A.Cognome like '%" + token + "%' or A.Nome like '%" + token + "%')");
|
||||
if (st.hasMoreTokens())
|
||||
txt.append(" and ");
|
||||
}
|
||||
txt.append(")");
|
||||
wc.addWc(txt.toString());
|
||||
}
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(String.valueOf(s_Sql_Find) + wc.toString() + s_Sql_Order);
|
||||
return findRows(stmt, pageNumber, pageRows);
|
||||
} catch (SQLException e) {
|
||||
handleDebug(e);
|
||||
return AB_EMPTY_VECTUMERATOR;
|
||||
}
|
||||
}
|
||||
|
||||
public void findByIp(String l_ip) {
|
||||
String s_Sql_Find = "select A.* from POSTAZIONE AS A";
|
||||
String s_Sql_Order = "";
|
||||
WcString wc = new WcString();
|
||||
wc.addWc("A.ipAddress='" + l_ip + "'");
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(String.valueOf(s_Sql_Find) + wc.toString() + s_Sql_Order);
|
||||
findFirstRecord(stmt);
|
||||
} catch (SQLException e) {
|
||||
handleDebug(e);
|
||||
}
|
||||
}
|
||||
|
||||
public void findByHostname(String l_hostname) {
|
||||
String s_Sql_Find = "select A.* from POSTAZIONE AS A";
|
||||
String s_Sql_Order = "";
|
||||
WcString wc = new WcString();
|
||||
wc.addWc("A.hostname='" + l_hostname + "'");
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(String.valueOf(s_Sql_Find) + wc.toString() + s_Sql_Order);
|
||||
findFirstRecord(stmt);
|
||||
} catch (SQLException e) {
|
||||
handleDebug(e);
|
||||
}
|
||||
}
|
||||
|
||||
public long getFlgTipo() {
|
||||
return this.flgTipo;
|
||||
}
|
||||
|
||||
public void setFlgTipo(long flgTipo) {
|
||||
this.flgTipo = flgTipo;
|
||||
}
|
||||
|
||||
public String getStampanteA4Script() {
|
||||
return getStampanteA4().replaceAll("\\\\", "\\\\\\\\");
|
||||
}
|
||||
|
||||
public String getStampanteEtichetteScript() {
|
||||
return getStampanteEtichette().replaceAll("\\\\", "\\\\\\\\");
|
||||
}
|
||||
|
||||
public String getHostname() {
|
||||
return (this.hostname == null) ? "" : this.hostname.trim();
|
||||
}
|
||||
|
||||
public void setHostname(String hostname) {
|
||||
this.hostname = hostname;
|
||||
}
|
||||
}
|
||||
86
rus/WEB-INF/lib/ablia_src/com/ablia/common/PostazioneCR.java
Normal file
86
rus/WEB-INF/lib/ablia_src/com/ablia/common/PostazioneCR.java
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
package com.ablia.common;
|
||||
|
||||
import com.ablia.db.ApplParmFull;
|
||||
import com.ablia.db.CRAdapter;
|
||||
import java.sql.Timestamp;
|
||||
|
||||
public class PostazioneCR extends CRAdapter {
|
||||
private long id_postazione;
|
||||
|
||||
private String descrizione;
|
||||
|
||||
private String ipAddress;
|
||||
|
||||
private String stampanteLaser;
|
||||
|
||||
private String stampanteEtichette;
|
||||
|
||||
private Timestamp lastUpdTmst;
|
||||
|
||||
private long lastUpdId_user;
|
||||
|
||||
public PostazioneCR(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public PostazioneCR() {}
|
||||
|
||||
public void setId_postazione(long newId_postazione) {
|
||||
this.id_postazione = newId_postazione;
|
||||
}
|
||||
|
||||
public void setDescrizione(String newDescrizione) {
|
||||
this.descrizione = newDescrizione;
|
||||
}
|
||||
|
||||
public void setIpAddress(String newIpAddress) {
|
||||
this.ipAddress = newIpAddress;
|
||||
}
|
||||
|
||||
public void setStampanteLaser(String newStampanteLaser) {
|
||||
this.stampanteLaser = newStampanteLaser;
|
||||
}
|
||||
|
||||
public void setStampanteEtichette(String newStampanteEtichette) {
|
||||
this.stampanteEtichette = newStampanteEtichette;
|
||||
}
|
||||
|
||||
public void setLastUpdTmst(Timestamp newLastUpdTmst) {
|
||||
this.lastUpdTmst = newLastUpdTmst;
|
||||
}
|
||||
|
||||
public void setLastUpdId_user(long newLastUpdId_user) {
|
||||
this.lastUpdId_user = newLastUpdId_user;
|
||||
}
|
||||
|
||||
public long getId_postazione() {
|
||||
return this.id_postazione;
|
||||
}
|
||||
|
||||
public String getDescrizione() {
|
||||
return (this.descrizione == null) ? "" :
|
||||
this.descrizione.trim();
|
||||
}
|
||||
|
||||
public String getIpAddress() {
|
||||
return (this.ipAddress == null) ? "" : this.ipAddress.trim();
|
||||
}
|
||||
|
||||
public String getStampanteLaser() {
|
||||
return (this.stampanteLaser == null) ? "" :
|
||||
this.stampanteLaser.trim();
|
||||
}
|
||||
|
||||
public String getStampanteEtichette() {
|
||||
return (this.stampanteEtichette == null) ? "" :
|
||||
this.stampanteEtichette.trim();
|
||||
}
|
||||
|
||||
public Timestamp getLastUpdTmst() {
|
||||
return this.lastUpdTmst;
|
||||
}
|
||||
|
||||
public long getLastUpdId_user() {
|
||||
return this.lastUpdId_user;
|
||||
}
|
||||
}
|
||||
39
rus/WEB-INF/lib/ablia_src/com/ablia/common/PostazioneI.java
Normal file
39
rus/WEB-INF/lib/ablia_src/com/ablia/common/PostazioneI.java
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
package com.ablia.common;
|
||||
|
||||
import com.ablia.util.Vectumerator;
|
||||
|
||||
public interface PostazioneI {
|
||||
void setId_postazione(long paramLong);
|
||||
|
||||
void setDescrizione(String paramString);
|
||||
|
||||
void setIpAddress(String paramString);
|
||||
|
||||
void setStampanteA4(String paramString);
|
||||
|
||||
void setStampanteEtichette(String paramString);
|
||||
|
||||
long getId_postazione();
|
||||
|
||||
String getDescrizione();
|
||||
|
||||
String getIpAddress();
|
||||
|
||||
String getStampanteA4();
|
||||
|
||||
String getStampanteEtichette();
|
||||
|
||||
Vectumerator findByCR(PostazioneCR paramPostazioneCR, int paramInt1, int paramInt2);
|
||||
|
||||
void findByIp(String paramString);
|
||||
|
||||
void findByHostname(String paramString);
|
||||
|
||||
long getFlgTipo();
|
||||
|
||||
void setFlgTipo(long paramLong);
|
||||
|
||||
String getStampanteA4Script();
|
||||
|
||||
String getStampanteEtichetteScript();
|
||||
}
|
||||
303
rus/WEB-INF/lib/ablia_src/com/ablia/common/SimboliLavaggio.java
Normal file
303
rus/WEB-INF/lib/ablia_src/com/ablia/common/SimboliLavaggio.java
Normal file
|
|
@ -0,0 +1,303 @@
|
|||
package com.ablia.common;
|
||||
|
||||
import com.ablia.util.Vectumerator;
|
||||
import java.util.Enumeration;
|
||||
import java.util.Hashtable;
|
||||
|
||||
public class SimboliLavaggio {
|
||||
private long lavaggio;
|
||||
|
||||
private long candeggio;
|
||||
|
||||
private long stiratura;
|
||||
|
||||
private long pulituraSecco;
|
||||
|
||||
private long asciugatura;
|
||||
|
||||
private long asciugaturaNaturale;
|
||||
|
||||
private static Hashtable<Long, SimboloLavaggio> dbSimboli;
|
||||
|
||||
public static final int NESSUN_SIMBOLO = 0;
|
||||
|
||||
public static final int LAVAGGIO_NO = 101;
|
||||
|
||||
public static final int LAVAGGIO_A_MANO = 102;
|
||||
|
||||
public static final int LAVAGGIO_DELICATO_MAX_30_1 = 103;
|
||||
|
||||
public static final int LAVAGGIO_DELICATO_MAX_30_2 = 104;
|
||||
|
||||
public static final int LAVAGGIO_DELICATO_MAX_30_3 = 105;
|
||||
|
||||
public static final int LAVAGGIO_DELICATO_MAX_40_1 = 106;
|
||||
|
||||
public static final int LAVAGGIO_DELICATO_MAX_40_2 = 107;
|
||||
|
||||
public static final int LAVAGGIO_DELICATO_MAX_40_3 = 108;
|
||||
|
||||
public static final int LAVAGGIO_DELICATO_MAX_50_1 = 109;
|
||||
|
||||
public static final int LAVAGGIO_DELICATO_MAX_50_2 = 110;
|
||||
|
||||
public static final int LAVAGGIO_DELICATO_MAX_60_1 = 111;
|
||||
|
||||
public static final int LAVAGGIO_DELICATO_MAX_60_2 = 112;
|
||||
|
||||
public static final int LAVAGGIO_DELICATO_MAX_70_1 = 113;
|
||||
|
||||
public static final int LAVAGGIO_DELICATO_MAX_95_1 = 114;
|
||||
|
||||
public static final int LAVAGGIO_DELICATO_MAX_95_2 = 115;
|
||||
|
||||
public static final int LAVAGGIO_ACQUA_PROFESSIONALE_1 = 601;
|
||||
|
||||
public static final int LAVAGGIO_ACQUA_PROFESSIONALE_2 = 602;
|
||||
|
||||
public static final int LAVAGGIO_ACQUA_PROFESSIONALE_3 = 603;
|
||||
|
||||
public static final int CANDEGGIO_NO = 201;
|
||||
|
||||
public static final int CANDEGGIO_CLORO_E_PERBORATO = 202;
|
||||
|
||||
public static final int CANDEGGIO_SOLO_PERBORATO = 203;
|
||||
|
||||
public static final int CANDEGGIO_CON_CLORO = 204;
|
||||
|
||||
public static final int ASCIUGARE_NO = 301;
|
||||
|
||||
public static final int ASCIUGARE_TEMP_INF_60 = 302;
|
||||
|
||||
public static final int ASCIUGARE_ALTA_TEMP = 303;
|
||||
|
||||
public static final int ASCIUGARE_SI = 304;
|
||||
|
||||
public static final int ASCIUGARE_NATURALE_1 = 701;
|
||||
|
||||
public static final int ASCIUGARE_NATURALE_2 = 702;
|
||||
|
||||
public static final int ASCIUGARE_NATURALE_3 = 703;
|
||||
|
||||
public static final int ASCIUGARE_NATURALE_4 = 704;
|
||||
|
||||
public static final int ASCIUGARE_NATURALE_5 = 705;
|
||||
|
||||
public static final int ASCIUGARE_NATURALE_6 = 706;
|
||||
|
||||
public static final int STIRO_NO = 401;
|
||||
|
||||
public static final int STIRO_BASSA_TEMP = 402;
|
||||
|
||||
public static final int STIRO_MEDIA_TEMP = 403;
|
||||
|
||||
public static final int STIRO_ALTA_TEMP = 404;
|
||||
|
||||
public static final int PULITURA_NO = 501;
|
||||
|
||||
public static final int PULITURA_TUTTI_I_SOLVENTI_1 = 502;
|
||||
|
||||
public static final int PULITURA_TUTTI_I_SOLVENTI_IN_USO_A = 503;
|
||||
|
||||
public static final int PULITURA_BENZIA_AVIO_E_R113 = 504;
|
||||
|
||||
public static final int PULITURA_BENZIA_AVIO_E_R113_CON_LIMITI_TEMP_UMIDITA = 505;
|
||||
|
||||
public static final int PULITURA_IDROC_E_TRIFLUORO_TRICLOROETANO = 506;
|
||||
|
||||
public static final int PULITURA_IDROC_E_TRIFLUORO_TRICLOROETANO_CON_LIMITI = 507;
|
||||
|
||||
private long lavaggioProfessionale;
|
||||
|
||||
public SimboliLavaggio() {
|
||||
getDbSimboli();
|
||||
}
|
||||
|
||||
public SimboloLavaggio getAsciugatura() {
|
||||
if (getDbSimboli().containsKey(new Long(this.asciugatura)))
|
||||
return getDbSimboli().get(new Long(this.asciugatura));
|
||||
return new SimboloLavaggio();
|
||||
}
|
||||
|
||||
public Vectumerator<SimboloLavaggio> getAsciugature() {
|
||||
return getSimboli(1, 3);
|
||||
}
|
||||
|
||||
public Vectumerator<SimboloLavaggio> getCandeggi() {
|
||||
return getSimboli(11, 12);
|
||||
}
|
||||
|
||||
public SimboloLavaggio getCandeggio() {
|
||||
if (getDbSimboli().containsKey(new Long(this.candeggio)))
|
||||
return getDbSimboli().get(new Long(this.candeggio));
|
||||
return new SimboloLavaggio();
|
||||
}
|
||||
|
||||
private Hashtable<Long, SimboloLavaggio> getDbSimboli() {
|
||||
if (dbSimboli == null) {
|
||||
dbSimboli = new Hashtable<>(40);
|
||||
dbSimboli.put(new Long(0L), new SimboloLavaggio(0, "Nessun Simbolo"));
|
||||
dbSimboli.put(new Long(101L), new SimboloLavaggio(101, "Non Lavare"));
|
||||
dbSimboli.put(new Long(102L), new SimboloLavaggio(102, "Lavare a mano"));
|
||||
dbSimboli.put(new Long(103L),
|
||||
new SimboloLavaggio(103, "Lavaggio delicato max 30°"));
|
||||
dbSimboli.put(new Long(104L),
|
||||
new SimboloLavaggio(104, "Lavaggio delicato max 30°"));
|
||||
dbSimboli.put(new Long(105L),
|
||||
new SimboloLavaggio(105, "Lavaggio delicato max 30°"));
|
||||
dbSimboli.put(new Long(106L),
|
||||
new SimboloLavaggio(106, "Lavaggio delicato max 40°"));
|
||||
dbSimboli.put(new Long(107L),
|
||||
new SimboloLavaggio(107, "Lavaggio delicato max 40°"));
|
||||
dbSimboli.put(new Long(108L),
|
||||
new SimboloLavaggio(108, "Lavaggio delicato max 40°"));
|
||||
dbSimboli.put(new Long(109L),
|
||||
new SimboloLavaggio(109, "Lavaggio delicato max 50°"));
|
||||
dbSimboli.put(new Long(110L),
|
||||
new SimboloLavaggio(110, "Lavaggio delicato max 50°"));
|
||||
dbSimboli.put(new Long(111L),
|
||||
new SimboloLavaggio(111, "Lavaggio delicato max 60°"));
|
||||
dbSimboli.put(new Long(112L),
|
||||
new SimboloLavaggio(112, "Lavaggio delicato max 60°"));
|
||||
dbSimboli.put(new Long(113L),
|
||||
new SimboloLavaggio(113, "Lavaggio delicato max 70°"));
|
||||
dbSimboli.put(new Long(114L),
|
||||
new SimboloLavaggio(114, "Lavaggio delicato max 95°"));
|
||||
dbSimboli.put(new Long(115L),
|
||||
new SimboloLavaggio(115, "Lavaggio delicato max 95°"));
|
||||
dbSimboli.put(new Long(201L), new SimboloLavaggio(201, "Non Candeggiabile"));
|
||||
dbSimboli.put(new Long(202L),
|
||||
new SimboloLavaggio(202, "Ammesso candeggio cloro e perborato"));
|
||||
dbSimboli.put(new Long(203L),
|
||||
new SimboloLavaggio(203, "Ammesso candeggio solo perborato"));
|
||||
dbSimboli.put(new Long(204L), new SimboloLavaggio(204, "Ammesso candeggio con cloro"));
|
||||
dbSimboli.put(new Long(301L), new SimboloLavaggio(301, "Non Asciugare"));
|
||||
dbSimboli.put(new Long(302L), new SimboloLavaggio(302, "Temperatura inferiore a 60°"));
|
||||
dbSimboli.put(new Long(303L), new SimboloLavaggio(303, "Alta Temperatura"));
|
||||
dbSimboli.put(new Long(304L), new SimboloLavaggio(304, "Asciugare"));
|
||||
dbSimboli.put(new Long(401L), new SimboloLavaggio(401, "Non stirare"));
|
||||
dbSimboli.put(new Long(402L), new SimboloLavaggio(402, "Bassa Temperatura"));
|
||||
dbSimboli.put(new Long(403L), new SimboloLavaggio(403, "Media Temperatura"));
|
||||
dbSimboli.put(new Long(404L), new SimboloLavaggio(404, "Alta temperatura"));
|
||||
dbSimboli.put(new Long(501L), new SimboloLavaggio(501, "Non pulire a secco"));
|
||||
dbSimboli.put(new Long(502L), new SimboloLavaggio(502, "Tutti i solventi"));
|
||||
dbSimboli.put(new Long(503L),
|
||||
new SimboloLavaggio(503, "Tutti i solventi in uso"));
|
||||
dbSimboli.put(new Long(504L), new SimboloLavaggio(504, "Benzina Avio e R113"));
|
||||
dbSimboli.put(new Long(505L),
|
||||
new SimboloLavaggio(505,
|
||||
"Benzina Avio e R113 nel rispetto dei limiti di temperatura e umidita'"));
|
||||
dbSimboli.put(new Long(506L),
|
||||
new SimboloLavaggio(506, "Lavaggio con idrocarburi e trifluoro-tricloroetano"));
|
||||
dbSimboli.put(new Long(507L),
|
||||
new SimboloLavaggio(507,
|
||||
"Lavaggio con idrocarburi e trifluoro-tricloroetano nel rispetto dei limiti di temperatura e umidita'"));
|
||||
dbSimboli.put(new Long(601L),
|
||||
new SimboloLavaggio(601, "Lavaggio ad acqua professionale"));
|
||||
dbSimboli.put(new Long(602L),
|
||||
new SimboloLavaggio(602, "Lavaggio ad acqua professionale"));
|
||||
dbSimboli.put(new Long(603L),
|
||||
new SimboloLavaggio(603, "Lavaggio ad acqua professionale"));
|
||||
dbSimboli.put(new Long(701L), new SimboloLavaggio(701, "Asciugatura Naturale"));
|
||||
dbSimboli.put(new Long(702L), new SimboloLavaggio(702, "Asciugatura Naturale"));
|
||||
dbSimboli.put(new Long(703L), new SimboloLavaggio(703, "Asciugatura Naturale"));
|
||||
dbSimboli.put(new Long(704L), new SimboloLavaggio(704, "Asciugatura Naturale"));
|
||||
dbSimboli.put(new Long(705L), new SimboloLavaggio(705, "Asciugatura Naturale"));
|
||||
dbSimboli.put(new Long(706L), new SimboloLavaggio(706, "Asciugatura Naturale"));
|
||||
}
|
||||
return dbSimboli;
|
||||
}
|
||||
|
||||
public Vectumerator<SimboloLavaggio> getLavaggi() {
|
||||
return getSimboli(41, 49);
|
||||
}
|
||||
|
||||
public SimboloLavaggio getLavaggio() {
|
||||
if (getDbSimboli().containsKey(new Long(this.lavaggio)))
|
||||
return getDbSimboli().get(new Long(this.lavaggio));
|
||||
return new SimboloLavaggio();
|
||||
}
|
||||
|
||||
public SimboloLavaggio getPulituraSecco() {
|
||||
if (getDbSimboli().containsKey(new Long(this.pulituraSecco)))
|
||||
return getDbSimboli().get(new Long(this.pulituraSecco));
|
||||
return new SimboloLavaggio();
|
||||
}
|
||||
|
||||
public Vectumerator<SimboloLavaggio> getPulitureSecco() {
|
||||
return getSimboli(31, 34);
|
||||
}
|
||||
|
||||
private Vectumerator<SimboloLavaggio> getSimboli(int start, int end) {
|
||||
Vectumerator<SimboloLavaggio> vec = new Vectumerator<>();
|
||||
for (int i = start; i <= end; i++)
|
||||
vec.addElement(getDbSimboli().get(new Long((long)i)));
|
||||
return vec;
|
||||
}
|
||||
|
||||
public SimboloLavaggio getStiratura() {
|
||||
if (getDbSimboli().containsKey(new Long(this.stiratura)))
|
||||
return getDbSimboli().get(new Long(this.stiratura));
|
||||
return new SimboloLavaggio();
|
||||
}
|
||||
|
||||
public Vectumerator<SimboloLavaggio> getStirature() {
|
||||
return getSimboli(21, 24);
|
||||
}
|
||||
|
||||
public Vectumerator<SimboloLavaggio> getTuttiSimboli() {
|
||||
Vectumerator<SimboloLavaggio> vec = new Vectumerator<>();
|
||||
Enumeration<SimboloLavaggio> enu = getDbSimboli().elements();
|
||||
while (enu.hasMoreElements())
|
||||
vec.addElement(enu.nextElement());
|
||||
return vec;
|
||||
}
|
||||
|
||||
public void setAsciugatura(long newAsciugatura) {
|
||||
this.asciugatura = newAsciugatura;
|
||||
}
|
||||
|
||||
public void setCandeggio(long newCandeggio) {
|
||||
this.candeggio = newCandeggio;
|
||||
}
|
||||
|
||||
public void setLavaggio(long newLavaggio) {
|
||||
this.lavaggio = newLavaggio;
|
||||
}
|
||||
|
||||
public void setPulituraSecco(long newPulituraSecco) {
|
||||
this.pulituraSecco = newPulituraSecco;
|
||||
}
|
||||
|
||||
public void setStiratura(long newStiratura) {
|
||||
this.stiratura = newStiratura;
|
||||
}
|
||||
|
||||
public long getAsciugaturaNaturale() {
|
||||
return this.asciugaturaNaturale;
|
||||
}
|
||||
|
||||
public void setAsciugaturaNaturale(long asciugaturaNaturale) {
|
||||
this.asciugaturaNaturale = asciugaturaNaturale;
|
||||
}
|
||||
|
||||
public long getLavaggioProfessionale() {
|
||||
return this.lavaggioProfessionale;
|
||||
}
|
||||
|
||||
public void setLavaggioProfessionale(long lavaggioProfessionale) {
|
||||
this.lavaggioProfessionale = lavaggioProfessionale;
|
||||
}
|
||||
|
||||
public boolean hasTuttiISimboli() {
|
||||
if (this.candeggio == 0L || this.asciugatura == 0L || this.lavaggio == 0L || this.pulituraSecco == 0L || this.stiratura == 0L)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean hasAlmenoUnSimbolo() {
|
||||
if (this.candeggio != 0L || this.asciugatura != 0L || this.lavaggio != 0L || this.pulituraSecco != 0L || this.stiratura != 0L)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
package com.ablia.common;
|
||||
|
||||
public class SimboloLavaggio {
|
||||
private int codiceSimbolo;
|
||||
|
||||
private String descrizione;
|
||||
|
||||
public SimboloLavaggio() {}
|
||||
|
||||
public SimboloLavaggio(int codiceSimbolo, String descrizione) {
|
||||
this.codiceSimbolo = codiceSimbolo;
|
||||
this.descrizione = descrizione;
|
||||
}
|
||||
|
||||
public int getCodiceSimbolo() {
|
||||
return this.codiceSimbolo;
|
||||
}
|
||||
|
||||
public String getDescrizione() {
|
||||
return this.descrizione;
|
||||
}
|
||||
|
||||
public void setCodiceSimbolo(int newCodiceSimbolo) {
|
||||
this.codiceSimbolo = newCodiceSimbolo;
|
||||
}
|
||||
|
||||
public void setDescrizione(String newDescrizione) {
|
||||
this.descrizione = newDescrizione;
|
||||
}
|
||||
}
|
||||
134
rus/WEB-INF/lib/ablia_src/com/ablia/common/StatusMsg.java
Normal file
134
rus/WEB-INF/lib/ablia_src/com/ablia/common/StatusMsg.java
Normal file
|
|
@ -0,0 +1,134 @@
|
|||
package com.ablia.common;
|
||||
|
||||
import com.ablia.db.ApplParmFull;
|
||||
import com.ablia.db.DBAdapter;
|
||||
import com.ablia.db.ResParm;
|
||||
import com.ablia.db.WcString;
|
||||
import com.ablia.util.Vectumerator;
|
||||
import java.io.Serializable;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.SQLException;
|
||||
|
||||
public class StatusMsg extends DBAdapter implements Serializable {
|
||||
private static final long serialVersionUID = 1543946266505L;
|
||||
|
||||
private long id_statusMsg;
|
||||
|
||||
private String tag;
|
||||
|
||||
private String msg;
|
||||
|
||||
public StatusMsg(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public StatusMsg() {}
|
||||
|
||||
public void setId_statusMsg(long newId_statusMsg) {
|
||||
this.id_statusMsg = newId_statusMsg;
|
||||
}
|
||||
|
||||
public void setTag(String newTag) {
|
||||
this.tag = newTag;
|
||||
}
|
||||
|
||||
public void setMsg(String newMsg) {
|
||||
this.msg = newMsg;
|
||||
}
|
||||
|
||||
public long getId_statusMsg() {
|
||||
return this.id_statusMsg;
|
||||
}
|
||||
|
||||
public String getTag() {
|
||||
return (this.tag == null) ? "" : this.tag.trim();
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return (this.msg == null) ? "" : this.msg.trim();
|
||||
}
|
||||
|
||||
protected ResParm checkDeleteCascade() {
|
||||
return new ResParm(true);
|
||||
}
|
||||
|
||||
protected void deleteCascade() {}
|
||||
|
||||
public Vectumerator<StatusMsg> findByCR(StatusMsgCR CR, int pageNumber, int pageRows) {
|
||||
String s_Sql_Find = "select DISTINCT A.* from STATUS_MSG AS A";
|
||||
String s_Sql_Order = " order by A.id_statusMsg";
|
||||
WcString wc = new WcString();
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(String.valueOf(s_Sql_Find) + wc.toString() + s_Sql_Order);
|
||||
return (Vectumerator)findRows(stmt, pageNumber, pageRows);
|
||||
} catch (SQLException e) {
|
||||
removeCPConnection();
|
||||
handleDebug(e);
|
||||
return (Vectumerator)AB_EMPTY_VECTUMERATOR;
|
||||
}
|
||||
}
|
||||
|
||||
public void findByTag(String l_tag) {
|
||||
String s_Sql_Find = "select DISTINCT A.* from STATUS_MSG AS A";
|
||||
String s_Sql_Order = " order by A.id_statusMsg";
|
||||
WcString wc = new WcString();
|
||||
if (!l_tag.isEmpty())
|
||||
wc.addWc("A.tag='" + l_tag + "'");
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(String.valueOf(s_Sql_Find) + wc.toString() + s_Sql_Order);
|
||||
findFirstRecord(stmt);
|
||||
} catch (SQLException e) {
|
||||
removeCPConnection();
|
||||
handleDebug(e);
|
||||
}
|
||||
}
|
||||
|
||||
public static final synchronized ResParm deleteAllMsg(ApplParmFull apFull) {
|
||||
StatusMsg bean = new StatusMsg(apFull);
|
||||
ResParm rp = bean.delete("delete from STATUS_MSG");
|
||||
return rp;
|
||||
}
|
||||
|
||||
public static final synchronized ResParm deleteMsgByTag(ApplParmFull apFull, String l_tag) {
|
||||
StatusMsg bean = new StatusMsg(apFull);
|
||||
ResParm rp = bean.delete("delete from STATUS_MSG where tag='" + l_tag + "'");
|
||||
return rp;
|
||||
}
|
||||
|
||||
public static final synchronized void appendMsgByTag(ApplParmFull apFull, String l_tag, String l_msg) {
|
||||
StatusMsg bean = new StatusMsg(apFull);
|
||||
bean.findByTag(l_tag);
|
||||
bean.setTag(l_tag);
|
||||
bean.setMsg(String.valueOf(bean.getMsg()) + "\n" + l_msg);
|
||||
bean.save();
|
||||
}
|
||||
|
||||
public static final synchronized String getMsgByTag(ApplParmFull apFull, String l_tag) {
|
||||
StatusMsg bean = new StatusMsg(apFull);
|
||||
Vectumerator<StatusMsg> vec = bean.findByCR(null, 0, 0);
|
||||
StringBuilder sb = new StringBuilder();
|
||||
while (vec.hasMoreElements()) {
|
||||
StatusMsg row = vec.nextElement();
|
||||
if (!row.getTag().isEmpty()) {
|
||||
sb.append(row.getTag());
|
||||
sb.append(": ");
|
||||
}
|
||||
sb.append(row.getMsg());
|
||||
if (vec.hasMoreElements())
|
||||
sb.append("\n");
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public static final synchronized String getMsgHtmlByTag(ApplParmFull apFull, String l_tag) {
|
||||
return DBAdapter.convertStringToHtml(getMsgByTag(apFull, l_tag));
|
||||
}
|
||||
|
||||
public static final synchronized void updateMsgByTag(ApplParmFull apFull, String l_tag, String l_msg) {
|
||||
StatusMsg bean = new StatusMsg(apFull);
|
||||
bean.findByTag(l_tag);
|
||||
bean.setTag(l_tag);
|
||||
bean.setMsg(l_msg);
|
||||
bean.save();
|
||||
}
|
||||
}
|
||||
42
rus/WEB-INF/lib/ablia_src/com/ablia/common/StatusMsgCR.java
Normal file
42
rus/WEB-INF/lib/ablia_src/com/ablia/common/StatusMsgCR.java
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
package com.ablia.common;
|
||||
|
||||
import com.ablia.db.ApplParmFull;
|
||||
import com.ablia.db.CRAdapter;
|
||||
|
||||
public class StatusMsgCR extends CRAdapter {
|
||||
private long id_statusMsg;
|
||||
|
||||
private String tag;
|
||||
|
||||
private String msg;
|
||||
|
||||
public StatusMsgCR(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public StatusMsgCR() {}
|
||||
|
||||
public void setId_statusMsg(long newId_statusMsg) {
|
||||
this.id_statusMsg = newId_statusMsg;
|
||||
}
|
||||
|
||||
public void setTag(String newTag) {
|
||||
this.tag = newTag;
|
||||
}
|
||||
|
||||
public void setMsg(String newMsg) {
|
||||
this.msg = newMsg;
|
||||
}
|
||||
|
||||
public long getId_statusMsg() {
|
||||
return this.id_statusMsg;
|
||||
}
|
||||
|
||||
public String getTag() {
|
||||
return (this.tag == null) ? "" : this.tag.trim();
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return (this.msg == null) ? "" : this.msg.trim();
|
||||
}
|
||||
}
|
||||
695
rus/WEB-INF/lib/ablia_src/com/ablia/common/TableDesc.java
Normal file
695
rus/WEB-INF/lib/ablia_src/com/ablia/common/TableDesc.java
Normal file
|
|
@ -0,0 +1,695 @@
|
|||
package com.ablia.common;
|
||||
|
||||
import com.ablia.db.ApplParmFull;
|
||||
import com.ablia.db.DBAdapter;
|
||||
import com.ablia.db.ResParm;
|
||||
import com.ablia.db.WcString;
|
||||
import com.ablia.util.StringTokenizer;
|
||||
import com.ablia.util.Vectumerator;
|
||||
import java.io.Serializable;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.SQLException;
|
||||
|
||||
public class TableDesc extends DBAdapter implements Serializable {
|
||||
private static final long serialVersionUID = 1501275837045L;
|
||||
|
||||
public static final long FORM_FIELD_INPUT = 0L;
|
||||
|
||||
public static final long FORM_FIELD_COMBO = 1L;
|
||||
|
||||
public static final long FORM_FIELD_COMBO_FLG = 2L;
|
||||
|
||||
public static final long FORM_FIELD_CHECKBOX = 3L;
|
||||
|
||||
public static final long FORM_FIELD_RADIOBUTON = 4L;
|
||||
|
||||
public static final long FORM_FIELD_TEXT_AREA = 5L;
|
||||
|
||||
public static final long FORM_FIELD_AJAX = 6L;
|
||||
|
||||
private long id_tableDesc;
|
||||
|
||||
private long flgAjaxUseSubmit;
|
||||
|
||||
private String ajaxNextAction;
|
||||
|
||||
private String label;
|
||||
|
||||
private long flgTipo;
|
||||
|
||||
private long flgReadOnly;
|
||||
|
||||
private long ordine;
|
||||
|
||||
private long rowNumbCR;
|
||||
|
||||
private long colLg;
|
||||
|
||||
private long colXsCR;
|
||||
|
||||
private String ajaxSearchString;
|
||||
|
||||
private String valoreDefaultCR;
|
||||
|
||||
private boolean firstField;
|
||||
|
||||
private Access access;
|
||||
|
||||
private long maxLenght;
|
||||
|
||||
private long flgHidden;
|
||||
|
||||
private long colLgCR;
|
||||
|
||||
private long colXs;
|
||||
|
||||
private long ordineCR;
|
||||
|
||||
private long rowNumb;
|
||||
|
||||
private long flgPk;
|
||||
|
||||
private long numColSearch;
|
||||
|
||||
private long flgFormField;
|
||||
|
||||
private long flgCR;
|
||||
|
||||
private long tabOrder;
|
||||
|
||||
private String tabName;
|
||||
|
||||
private String comboFlgValuelist;
|
||||
|
||||
private String toolTip;
|
||||
|
||||
private long flgHtml;
|
||||
|
||||
private long ajaxNChar;
|
||||
|
||||
private String nomeColonna;
|
||||
|
||||
private long flgAjaxUseMono;
|
||||
|
||||
private String id_access;
|
||||
|
||||
private String ajaxJavascriptmodify;
|
||||
|
||||
private String ajaxJavascriptnew;
|
||||
|
||||
private String ajaxFieldsMapping;
|
||||
|
||||
public TableDesc(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public TableDesc() {}
|
||||
|
||||
public void setId_tableDesc(long newId_tableDesc) {
|
||||
this.id_tableDesc = newId_tableDesc;
|
||||
}
|
||||
|
||||
public void setId_access(String newId_access) {
|
||||
this.id_access = newId_access;
|
||||
setAccess(null);
|
||||
}
|
||||
|
||||
public void setNomeColonna(String newNomeColonna) {
|
||||
this.nomeColonna = newNomeColonna;
|
||||
}
|
||||
|
||||
public void setLabel(String newLabel) {
|
||||
this.label = newLabel;
|
||||
}
|
||||
|
||||
public void setFlgTipo(long newFlgTipo) {
|
||||
this.flgTipo = newFlgTipo;
|
||||
}
|
||||
|
||||
public void setFlgCR(long newFlgCR) {
|
||||
this.flgCR = newFlgCR;
|
||||
}
|
||||
|
||||
public void setOrdine(long newOrdine) {
|
||||
this.ordine = newOrdine;
|
||||
}
|
||||
|
||||
public void setRowNumb(long newRowNumb) {
|
||||
this.rowNumb = newRowNumb;
|
||||
}
|
||||
|
||||
public void setColLg(long newColLg) {
|
||||
this.colLg = newColLg;
|
||||
}
|
||||
|
||||
public void setColXs(long newColXs) {
|
||||
this.colXs = newColXs;
|
||||
}
|
||||
|
||||
public void setAjaxSearchString(String newAjaxSearchString) {
|
||||
this.ajaxSearchString = newAjaxSearchString;
|
||||
}
|
||||
|
||||
public void setAjaxFieldsMapping(String newAjaxReturnValues) {
|
||||
this.ajaxFieldsMapping = newAjaxReturnValues;
|
||||
}
|
||||
|
||||
public long getId_tableDesc() {
|
||||
return this.id_tableDesc;
|
||||
}
|
||||
|
||||
public String getId_access() {
|
||||
return (this.id_access == null) ? "" : this.id_access.trim();
|
||||
}
|
||||
|
||||
public String getNomeColonna() {
|
||||
return (this.nomeColonna == null) ? "" : this.nomeColonna.trim();
|
||||
}
|
||||
|
||||
public String getLabel() {
|
||||
return (this.label == null) ? "" : this.label.trim();
|
||||
}
|
||||
|
||||
public long getFlgTipo() {
|
||||
return this.flgTipo;
|
||||
}
|
||||
|
||||
public long getFlgCR() {
|
||||
return this.flgCR;
|
||||
}
|
||||
|
||||
public long getOrdine() {
|
||||
return this.ordine;
|
||||
}
|
||||
|
||||
public long getRowNumb() {
|
||||
return this.rowNumb;
|
||||
}
|
||||
|
||||
public long getColLg() {
|
||||
return this.colLg;
|
||||
}
|
||||
|
||||
public long getColXs() {
|
||||
return this.colXs;
|
||||
}
|
||||
|
||||
public String getAjaxSearchString() {
|
||||
return (this.ajaxSearchString == null) ? "" : this.ajaxSearchString.trim();
|
||||
}
|
||||
|
||||
public String getAjaxFieldsMapping() {
|
||||
return (this.ajaxFieldsMapping == null) ? "" : this.ajaxFieldsMapping.trim();
|
||||
}
|
||||
|
||||
public void setAccess(Access newAccess) {
|
||||
this.access = newAccess;
|
||||
}
|
||||
|
||||
public Access getAccess() {
|
||||
this.access = (Access)getSecondaryObject(this.access, Access.class, getId_access());
|
||||
return this.access;
|
||||
}
|
||||
|
||||
protected ResParm checkDeleteCascade() {
|
||||
return new ResParm(true);
|
||||
}
|
||||
|
||||
protected void deleteCascade() {}
|
||||
|
||||
public Vectumerator<TableDesc> findHiddenByTable(String l_id_access) {
|
||||
String s_Sql_Find = "select DISTINCT A.* from TABLE_DESC AS A";
|
||||
String s_Sql_Order = "";
|
||||
WcString wc = new WcString();
|
||||
wc.addWc("A.id_access='" + l_id_access + "'");
|
||||
wc.addWc("A.flgHidden=1");
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(String.valueOf(s_Sql_Find) + wc.toString() + s_Sql_Order);
|
||||
return (Vectumerator)findRows(stmt);
|
||||
} catch (SQLException e) {
|
||||
removeCPConnection();
|
||||
handleDebug(e);
|
||||
return (Vectumerator)AB_EMPTY_VECTUMERATOR;
|
||||
}
|
||||
}
|
||||
|
||||
public Vectumerator<TableDesc> findPrimaryDetailFieldsByTable(String l_id_access) {
|
||||
String s_Sql_Find = "select DISTINCT A.* from TABLE_DESC AS A";
|
||||
String s_Sql_Order = " order by A.rowNumb, A.ordine";
|
||||
WcString wc = new WcString();
|
||||
wc.addWc("A.id_access='" + l_id_access + "'");
|
||||
wc.addWc("(A.flgHidden is null or A.flgHidden=0)");
|
||||
wc.addWc("A.rowNumb>0");
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(String.valueOf(s_Sql_Find) + wc.toString() + s_Sql_Order);
|
||||
return (Vectumerator)findRows(stmt);
|
||||
} catch (SQLException e) {
|
||||
removeCPConnection();
|
||||
handleDebug(e);
|
||||
return (Vectumerator)AB_EMPTY_VECTUMERATOR;
|
||||
}
|
||||
}
|
||||
|
||||
public void findByTabellaColonna(String nomeTabella, String nomeColonna) {
|
||||
String s_Sql_Find = "select DISTINCT A.* from TABLE_DESC AS A";
|
||||
String s_Sql_Order = "";
|
||||
WcString wc = new WcString();
|
||||
wc.addWc("A.id_access='" + nomeTabella + "'");
|
||||
wc.addWc("A.nomeColonna='" + nomeColonna + "'");
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(String.valueOf(s_Sql_Find) + wc.toString() + s_Sql_Order);
|
||||
findFirstRecord(stmt);
|
||||
} catch (SQLException e) {
|
||||
removeCPConnection();
|
||||
handleDebug(e);
|
||||
}
|
||||
}
|
||||
|
||||
public Vectumerator<TableDesc> findByTabella(String nomeTabella, long l_flgSearchType) {
|
||||
String s_Sql_Find = "select DISTINCT A.*, if(A.numColSearch is null,9999999999,A.numColSearch) as numColSearchOrder from TABLE_DESC AS A";
|
||||
String s_Sql_Order = " order by A.flgPk desc,A.nomeColonna";
|
||||
if (l_flgSearchType == 1L) {
|
||||
s_Sql_Order = " order by A.flgPk desc,A.rowNumbCR,A.ordineCR, A.nomeColonna";
|
||||
} else if (l_flgSearchType == 2L) {
|
||||
s_Sql_Order = " order by numColSearchOrder, A.nomeColonna";
|
||||
} else if (l_flgSearchType == 3L) {
|
||||
s_Sql_Order = " order by A.flgPk desc,A.rowNumb,A.ordine, A.nomeColonna";
|
||||
}
|
||||
WcString wc = new WcString();
|
||||
wc.addWc("A.id_access='" + nomeTabella + "'");
|
||||
if (l_flgSearchType == 1L)
|
||||
wc.addWc("A.flgCR=1");
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(String.valueOf(s_Sql_Find) + wc.toString() + s_Sql_Order);
|
||||
return (Vectumerator)findRows(stmt);
|
||||
} catch (SQLException e) {
|
||||
removeCPConnection();
|
||||
handleDebug(e);
|
||||
return (Vectumerator)AB_EMPTY_VECTUMERATOR;
|
||||
}
|
||||
}
|
||||
|
||||
public long getMaxLenght() {
|
||||
return this.maxLenght;
|
||||
}
|
||||
|
||||
public void setMaxLenght(long maxLenght) {
|
||||
this.maxLenght = maxLenght;
|
||||
}
|
||||
|
||||
public long getFlgHidden() {
|
||||
return this.flgHidden;
|
||||
}
|
||||
|
||||
public void setFlgHidden(long flgHidden) {
|
||||
this.flgHidden = flgHidden;
|
||||
}
|
||||
|
||||
public long getRowNumbCR() {
|
||||
return this.rowNumbCR;
|
||||
}
|
||||
|
||||
public void setRowNumbCR(long rowNumbCR) {
|
||||
this.rowNumbCR = rowNumbCR;
|
||||
}
|
||||
|
||||
public long getColXsCR() {
|
||||
return this.colXsCR;
|
||||
}
|
||||
|
||||
public void setColXsCR(long colXsCR) {
|
||||
this.colXsCR = colXsCR;
|
||||
}
|
||||
|
||||
public long getColLgCR() {
|
||||
return this.colLgCR;
|
||||
}
|
||||
|
||||
public void setColLgCR(long colLgCR) {
|
||||
this.colLgCR = colLgCR;
|
||||
}
|
||||
|
||||
public long getOrdineCR() {
|
||||
return this.ordineCR;
|
||||
}
|
||||
|
||||
public void setOrdineCR(long ordineCR) {
|
||||
this.ordineCR = ordineCR;
|
||||
}
|
||||
|
||||
public long getFlgPk() {
|
||||
return this.flgPk;
|
||||
}
|
||||
|
||||
public void setFlgPk(long flgPk) {
|
||||
this.flgPk = flgPk;
|
||||
}
|
||||
|
||||
public long getNumColSearch() {
|
||||
return this.numColSearch;
|
||||
}
|
||||
|
||||
public void setNumColSearch(long numColSearch) {
|
||||
this.numColSearch = numColSearch;
|
||||
}
|
||||
|
||||
public Vectumerator<TableDesc> findByCR(TableDescCR CR, int pageNumber, int pageRows) {
|
||||
String s_Sql_Find = "select DISTINCT A.* from TABLE_DESC AS A";
|
||||
String s_Sql_Order = " order by nomeColonna";
|
||||
WcString wc = new WcString();
|
||||
if (!CR.getSearchTxt().trim().isEmpty()) {
|
||||
StringTokenizer st = new StringTokenizer(CR.getSearchTxt().trim(), " ");
|
||||
StringBuffer txt = new StringBuffer("(");
|
||||
while (st.hasMoreTokens()) {
|
||||
String token = st.nextToken();
|
||||
txt.append("(A.id_access like '%" + token + "%' )");
|
||||
if (st.hasMoreTokens())
|
||||
txt.append(" and ");
|
||||
}
|
||||
txt.append(")");
|
||||
wc.addWc(txt.toString());
|
||||
}
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(String.valueOf(s_Sql_Find) + wc.toString() + s_Sql_Order);
|
||||
return (Vectumerator)findRows(stmt, pageNumber, pageRows);
|
||||
} catch (SQLException e) {
|
||||
removeCPConnection();
|
||||
handleDebug(e);
|
||||
return (Vectumerator)AB_EMPTY_VECTUMERATOR;
|
||||
}
|
||||
}
|
||||
|
||||
public String getComboDescColumnMethod() {
|
||||
if (getNomeColonna().indexOf("id_") != 0 || getFlgPk() == 1L)
|
||||
return "";
|
||||
Access fkAccess = getFkAccess();
|
||||
String comboDescColumn = fkAccess.getComboDescColumn(getNomeColonna());
|
||||
System.out.println("comboDescColumn: " + getNomeColonna() + " " + comboDescColumn);
|
||||
if (comboDescColumn != null) {
|
||||
String theFkBean = String.valueOf(getNomeColonna().substring(3, 4).toUpperCase()) + getNomeColonna().substring(4);
|
||||
String getMethodName = "get" + theFkBean + "()";
|
||||
if (comboDescColumn.isEmpty())
|
||||
return String.valueOf(getMethodName) + ".getDescrizione()";
|
||||
return String.valueOf(getMethodName) + ".get" + comboDescColumn.substring(0, 1).toUpperCase() + comboDescColumn.substring(1) + "()";
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
public static final String getFormField(long l_flgFormField) {
|
||||
switch ((int)l_flgFormField) {
|
||||
case 6:
|
||||
return "Ajax search";
|
||||
case 3:
|
||||
return "CheckBox";
|
||||
case 1:
|
||||
return "ComboBox";
|
||||
case 2:
|
||||
return "ComboBox con flg";
|
||||
case 0:
|
||||
return "Text";
|
||||
case 4:
|
||||
return "Radio Button";
|
||||
case 5:
|
||||
return "Text Area";
|
||||
}
|
||||
return "??";
|
||||
}
|
||||
|
||||
public final String getFormField() {
|
||||
return getFormField(getFlgFormField());
|
||||
}
|
||||
|
||||
public void setFlgFormField(long flgFormField) {
|
||||
this.flgFormField = flgFormField;
|
||||
}
|
||||
|
||||
public static final String getTipo(long l_flgTipo) {
|
||||
switch ((int)l_flgTipo) {
|
||||
case 12:
|
||||
return "Varchar";
|
||||
case 1:
|
||||
return "Char";
|
||||
case -16:
|
||||
return "Long N Varchar";
|
||||
case -1:
|
||||
return "Long Varchar";
|
||||
case 4:
|
||||
return "Integer";
|
||||
case -5:
|
||||
return "Bigint";
|
||||
case 5:
|
||||
return "Smallint";
|
||||
case 8:
|
||||
return "Double";
|
||||
case 3:
|
||||
return "Decimal";
|
||||
case 6:
|
||||
return "Float";
|
||||
case 91:
|
||||
return "Data";
|
||||
case 92:
|
||||
return "Time";
|
||||
case 2013:
|
||||
return "Time with timezone";
|
||||
case 93:
|
||||
return "Timestamp";
|
||||
case 16:
|
||||
return "Boolean";
|
||||
}
|
||||
return "Non Gestito: " + l_flgTipo;
|
||||
}
|
||||
|
||||
public final String getTipo() {
|
||||
return getTipo(getFlgTipo());
|
||||
}
|
||||
|
||||
public long getFlgReadOnly() {
|
||||
return this.flgReadOnly;
|
||||
}
|
||||
|
||||
public void setFlgReadOnly(long flgReadOnly) {
|
||||
this.flgReadOnly = flgReadOnly;
|
||||
}
|
||||
|
||||
public long getTabOrder() {
|
||||
return this.tabOrder;
|
||||
}
|
||||
|
||||
public void setTabOrder(long tabOrder) {
|
||||
this.tabOrder = tabOrder;
|
||||
}
|
||||
|
||||
public String getTabName() {
|
||||
return (this.tabName == null) ? "" : this.tabName.trim();
|
||||
}
|
||||
|
||||
public void setTabName(String tabName) {
|
||||
this.tabName = tabName;
|
||||
}
|
||||
|
||||
public Vectumerator<TableDesc> findCRFieldsByTable(String l_id_access) {
|
||||
String s_Sql_Find = "select DISTINCT A.* from TABLE_DESC AS A";
|
||||
String s_Sql_Order = " order by A.rowNumbCR, A.ordineCR";
|
||||
WcString wc = new WcString();
|
||||
wc.addWc("A.id_access='" + l_id_access + "'");
|
||||
wc.addWc("(A.flgHidden is null or A.flgHidden=0)");
|
||||
wc.addWc("A.flgCR=1");
|
||||
wc.addWc("A.rowNumbCR>0");
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(String.valueOf(s_Sql_Find) + wc.toString() + s_Sql_Order);
|
||||
return (Vectumerator)findRows(stmt);
|
||||
} catch (SQLException e) {
|
||||
removeCPConnection();
|
||||
handleDebug(e);
|
||||
return (Vectumerator)AB_EMPTY_VECTUMERATOR;
|
||||
}
|
||||
}
|
||||
|
||||
public Vectumerator<TableDesc> findCRListFieldsByTable(String l_id_access) {
|
||||
String s_Sql_Find = "select DISTINCT A.* from TABLE_DESC AS A";
|
||||
String s_Sql_Order = " order by A.numColSearch";
|
||||
WcString wc = new WcString();
|
||||
wc.addWc("A.id_access='" + l_id_access + "'");
|
||||
wc.addWc("A.numColSearch>0");
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(String.valueOf(s_Sql_Find) + wc.toString() + s_Sql_Order);
|
||||
return (Vectumerator)findRows(stmt);
|
||||
} catch (SQLException e) {
|
||||
removeCPConnection();
|
||||
handleDebug(e);
|
||||
return (Vectumerator)AB_EMPTY_VECTUMERATOR;
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isFirstField() {
|
||||
return this.firstField;
|
||||
}
|
||||
|
||||
public void setFirstField(boolean firstField) {
|
||||
this.firstField = firstField;
|
||||
}
|
||||
|
||||
public String getComboFlgValuelist() {
|
||||
return (this.comboFlgValuelist == null) ? "" : this.comboFlgValuelist.trim();
|
||||
}
|
||||
|
||||
public void setComboFlgValuelist(String newOptionValues) {
|
||||
this.comboFlgValuelist = newOptionValues;
|
||||
}
|
||||
|
||||
public String getToolTip() {
|
||||
return (this.toolTip == null) ? "" : this.toolTip.trim();
|
||||
}
|
||||
|
||||
public void setToolTip(String toolTip) {
|
||||
this.toolTip = toolTip;
|
||||
}
|
||||
|
||||
public long getFlgHtml() {
|
||||
return this.flgHtml;
|
||||
}
|
||||
|
||||
public void setFlgHtml(long flgHtml) {
|
||||
this.flgHtml = flgHtml;
|
||||
}
|
||||
|
||||
public ResParm updateFields(String fieldName, String value) {
|
||||
if (getId_tableDesc() == 0L)
|
||||
return new ResParm(false, "Errore! Impossibile aggiornare un bean nuovo.");
|
||||
long valueL = 0L;
|
||||
try {
|
||||
valueL = Long.parseLong(value);
|
||||
} catch (Exception e) {}
|
||||
if (fieldName.equals("label")) {
|
||||
setLabel(value);
|
||||
} else if (fieldName.equals("flgFormField")) {
|
||||
setFlgFormField(valueL);
|
||||
} else if (fieldName.equals("flgHidden")) {
|
||||
setFlgHidden(valueL);
|
||||
} else if (fieldName.equals("flgReadOnly")) {
|
||||
setFlgReadOnly(valueL);
|
||||
} else if (fieldName.equals("valoreDefaultCR")) {
|
||||
setValoreDefaultCR(value);
|
||||
} else if (fieldName.equals("flgHtml")) {
|
||||
setFlgHtml(valueL);
|
||||
} else if (fieldName.equals("maxLenght")) {
|
||||
setMaxLenght(valueL);
|
||||
} else if (fieldName.equals("comboFlgValuelist")) {
|
||||
setComboFlgValuelist(value);
|
||||
} else if (fieldName.equals("ajaxFieldsMapping")) {
|
||||
setAjaxFieldsMapping(value);
|
||||
} else if (fieldName.equals("toolTip")) {
|
||||
setToolTip(value);
|
||||
} else if (fieldName.equals("ajaxSearchString")) {
|
||||
setAjaxSearchString(value);
|
||||
} else if (fieldName.equals("ajaxReturnValues")) {
|
||||
setAjaxFieldsMapping(value);
|
||||
} else if (fieldName.equals("flgCR")) {
|
||||
setFlgCR(valueL);
|
||||
} else if (fieldName.equals("rowNumb")) {
|
||||
setRowNumb(valueL);
|
||||
} else if (fieldName.equals("ordine")) {
|
||||
setOrdine(valueL);
|
||||
} else if (fieldName.equals("colLg")) {
|
||||
setColLg(valueL);
|
||||
} else if (fieldName.equals("colXs")) {
|
||||
setColXs(valueL);
|
||||
} else if (fieldName.equals("rowNumbCR")) {
|
||||
setRowNumbCR(valueL);
|
||||
} else if (fieldName.equals("ordineCR")) {
|
||||
setOrdineCR(valueL);
|
||||
} else if (fieldName.equals("colLgCR")) {
|
||||
setColLgCR(valueL);
|
||||
} else if (fieldName.equals("colXsCR")) {
|
||||
setColXsCR(valueL);
|
||||
} else if (fieldName.equals("numColSearch")) {
|
||||
setNumColSearch(valueL);
|
||||
}
|
||||
return save();
|
||||
}
|
||||
|
||||
public long getFlgFormField() {
|
||||
return this.flgFormField;
|
||||
}
|
||||
|
||||
public long getAjaxNChar() {
|
||||
return this.ajaxNChar;
|
||||
}
|
||||
|
||||
public void setAjaxNChar(long nChar) {
|
||||
this.ajaxNChar = nChar;
|
||||
}
|
||||
|
||||
public String getAjaxNextAction() {
|
||||
return (this.ajaxNextAction == null) ? "" : this.ajaxNextAction.trim();
|
||||
}
|
||||
|
||||
public void setAjaxNextAction(String ajaxNextAction) {
|
||||
this.ajaxNextAction = ajaxNextAction;
|
||||
}
|
||||
|
||||
public long getFlgAjaxUseSubmit() {
|
||||
return this.flgAjaxUseSubmit;
|
||||
}
|
||||
|
||||
public void setFlgAjaxUseSubmit(long flgAjaxUseSubmit) {
|
||||
this.flgAjaxUseSubmit = flgAjaxUseSubmit;
|
||||
}
|
||||
|
||||
public long getFlgAjaxUseMono() {
|
||||
return this.flgAjaxUseMono;
|
||||
}
|
||||
|
||||
public void setFlgAjaxUseMono(long flgAjaxUseMono) {
|
||||
this.flgAjaxUseMono = flgAjaxUseMono;
|
||||
}
|
||||
|
||||
public String getAjaxJavascriptmodify() {
|
||||
return (this.ajaxJavascriptmodify == null) ? "" : this.ajaxJavascriptmodify.trim();
|
||||
}
|
||||
|
||||
public void setAjaxJavascriptmodify(String ajaxJavascriptmodify) {
|
||||
this.ajaxJavascriptmodify = ajaxJavascriptmodify;
|
||||
}
|
||||
|
||||
public String getAjaxJavascriptnew() {
|
||||
return (this.ajaxJavascriptnew == null) ? "" : this.ajaxJavascriptnew.trim();
|
||||
}
|
||||
|
||||
public void setAjaxJavascriptnew(String ajaxJavascriptnew) {
|
||||
this.ajaxJavascriptnew = ajaxJavascriptnew;
|
||||
}
|
||||
|
||||
public Access getFkAccess() {
|
||||
if (getNomeColonna().indexOf("id_") != 0 || getFlgPk() == 1L)
|
||||
return new Access(getApFull());
|
||||
String id_access = Access.convertFieldToTableName(getNomeColonna().substring(3));
|
||||
Access access = new Access(getApFull());
|
||||
access.findByPrimaryKey(id_access);
|
||||
return access;
|
||||
}
|
||||
|
||||
public String getValoreDefaultCR() {
|
||||
return (this.valoreDefaultCR == null) ? "" : this.valoreDefaultCR.trim();
|
||||
}
|
||||
|
||||
public void setValoreDefaultCR(String valoreDefaultCR) {
|
||||
this.valoreDefaultCR = valoreDefaultCR;
|
||||
}
|
||||
|
||||
public Vectumerator<TableDesc> findByTabellaDefaultValue(String nomeTabella) {
|
||||
String s_Sql_Find = "select DISTINCT A.*, if(A.numColSearch is null,9999999999,A.numColSearch) as numColSearchOrder from TABLE_DESC AS A";
|
||||
String s_Sql_Order = " order by A.flgPk desc,A.nomeColonna";
|
||||
WcString wc = new WcString();
|
||||
wc.addWc("A.id_access='" + nomeTabella + "'");
|
||||
wc.addWc("A.defaultValueCR is not null");
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(String.valueOf(s_Sql_Find) + wc.toString() + s_Sql_Order);
|
||||
return (Vectumerator)findRows(stmt);
|
||||
} catch (SQLException e) {
|
||||
removeCPConnection();
|
||||
handleDebug(e);
|
||||
return (Vectumerator)AB_EMPTY_VECTUMERATOR;
|
||||
}
|
||||
}
|
||||
}
|
||||
180
rus/WEB-INF/lib/ablia_src/com/ablia/common/TableDescCR.java
Normal file
180
rus/WEB-INF/lib/ablia_src/com/ablia/common/TableDescCR.java
Normal file
|
|
@ -0,0 +1,180 @@
|
|||
package com.ablia.common;
|
||||
|
||||
import com.ablia.db.ApplParmFull;
|
||||
import com.ablia.db.CRAdapter;
|
||||
|
||||
public class TableDescCR extends CRAdapter {
|
||||
private long id_tableDesc;
|
||||
|
||||
private String id_access;
|
||||
|
||||
private String nomeColonna;
|
||||
|
||||
private String lebel;
|
||||
|
||||
private long flgTipo;
|
||||
|
||||
private long flgCR;
|
||||
|
||||
private long ordine;
|
||||
|
||||
private long rowNumb;
|
||||
|
||||
private long colLg;
|
||||
|
||||
private long colXs;
|
||||
|
||||
private String optionValues;
|
||||
|
||||
private String comboDescColumn;
|
||||
|
||||
private String ajaxSearchString;
|
||||
|
||||
private String ajaxReturnValues;
|
||||
|
||||
public static final long SEARCH_TYPE_ELENCO_COLONNE = 0L;
|
||||
|
||||
public static final long SEARCH_TYPE_VISTA_CR = 1L;
|
||||
|
||||
public static final long SEARCH_TYPE_VISTA_CR_LISTA = 2L;
|
||||
|
||||
public static final long SEARCH_TYPE_VISTA_DETTAGLIO = 3L;
|
||||
|
||||
private Access access;
|
||||
|
||||
public TableDescCR(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public TableDescCR() {}
|
||||
|
||||
public void setId_tableDesc(long newId_tableDesc) {
|
||||
this.id_tableDesc = newId_tableDesc;
|
||||
}
|
||||
|
||||
public void setId_access(String newId_access) {
|
||||
this.id_access = newId_access;
|
||||
setAccess(null);
|
||||
}
|
||||
|
||||
public void setNomeColonna(String newNomeColonna) {
|
||||
this.nomeColonna = newNomeColonna;
|
||||
}
|
||||
|
||||
public void setLebel(String newLebel) {
|
||||
this.lebel = newLebel;
|
||||
}
|
||||
|
||||
public void setFlgTipo(long newFlgTipo) {
|
||||
this.flgTipo = newFlgTipo;
|
||||
}
|
||||
|
||||
public void setFlgCR(long newFlgCR) {
|
||||
this.flgCR = newFlgCR;
|
||||
}
|
||||
|
||||
public void setOrdine(long newOrdine) {
|
||||
this.ordine = newOrdine;
|
||||
}
|
||||
|
||||
public void setRowNumb(long newRowNumb) {
|
||||
this.rowNumb = newRowNumb;
|
||||
}
|
||||
|
||||
public void setColLg(long newColLg) {
|
||||
this.colLg = newColLg;
|
||||
}
|
||||
|
||||
public void setColXs(long newColXs) {
|
||||
this.colXs = newColXs;
|
||||
}
|
||||
|
||||
public void setOptionValues(String newOptionValues) {
|
||||
this.optionValues = newOptionValues;
|
||||
}
|
||||
|
||||
public void setComboDescColumn(String newComboDescColumn) {
|
||||
this.comboDescColumn = newComboDescColumn;
|
||||
}
|
||||
|
||||
public void setAjaxSearchString(String newAjaxSearchString) {
|
||||
this.ajaxSearchString = newAjaxSearchString;
|
||||
}
|
||||
|
||||
public void setAjaxReturnValues(String newAjaxReturnValues) {
|
||||
this.ajaxReturnValues = newAjaxReturnValues;
|
||||
}
|
||||
|
||||
public long getId_tableDesc() {
|
||||
return this.id_tableDesc;
|
||||
}
|
||||
|
||||
public String getId_access() {
|
||||
return (this.id_access == null) ? "" : this.id_access.trim();
|
||||
}
|
||||
|
||||
public String getNomeColonna() {
|
||||
return (this.nomeColonna == null) ? "" : this.nomeColonna.trim();
|
||||
}
|
||||
|
||||
public String getLebel() {
|
||||
return (this.lebel == null) ? "" : this.lebel.trim();
|
||||
}
|
||||
|
||||
public long getFlgTipo() {
|
||||
return this.flgTipo;
|
||||
}
|
||||
|
||||
public long getFlgCR() {
|
||||
return this.flgCR;
|
||||
}
|
||||
|
||||
public long getOrdine() {
|
||||
return this.ordine;
|
||||
}
|
||||
|
||||
public long getRowNumb() {
|
||||
return this.rowNumb;
|
||||
}
|
||||
|
||||
public long getColLg() {
|
||||
return this.colLg;
|
||||
}
|
||||
|
||||
public long getColXs() {
|
||||
return this.colXs;
|
||||
}
|
||||
|
||||
public String getOptionValues() {
|
||||
return (this.optionValues == null) ? "" : this.optionValues.trim();
|
||||
}
|
||||
|
||||
public String getComboDescColumn() {
|
||||
return (this.comboDescColumn == null) ? "" : this.comboDescColumn.trim();
|
||||
}
|
||||
|
||||
public String getAjaxSearchString() {
|
||||
return (this.ajaxSearchString == null) ? "" : this.ajaxSearchString.trim();
|
||||
}
|
||||
|
||||
public String getAjaxReturnValues() {
|
||||
return (this.ajaxReturnValues == null) ? "" : this.ajaxReturnValues.trim();
|
||||
}
|
||||
|
||||
public void setAccess(Access newAccess) {
|
||||
this.access = newAccess;
|
||||
}
|
||||
|
||||
public Access getAccess() {
|
||||
this.access = (Access)getSecondaryObject(this.access, Access.class, getId_access());
|
||||
return this.access;
|
||||
}
|
||||
|
||||
public final String getTipo() {
|
||||
return TableDesc.getTipo(getFlgTipo());
|
||||
}
|
||||
|
||||
public static final String getTipo(long l_flgTipo) {
|
||||
return TableDesc.getTipo(l_flgTipo);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
package com.ablia.common;
|
||||
|
||||
import com.ablia.util.Vectumerator;
|
||||
|
||||
public interface TipoInterface {
|
||||
Vectumerator findFigli(int paramInt1, int paramInt2);
|
||||
|
||||
long getNumeroFigli(long paramLong);
|
||||
|
||||
long getId_tipoPadre();
|
||||
|
||||
String getDescrizione();
|
||||
|
||||
String getDescrizioneCompleta();
|
||||
|
||||
String getDescrizione4Script();
|
||||
|
||||
long getFlgUsaVarianti();
|
||||
|
||||
long getId_tipo();
|
||||
|
||||
String getDescrizione(String paramString);
|
||||
|
||||
String getDescrizione4Script(String paramString);
|
||||
|
||||
String getDescrizioneCompleta(String paramString);
|
||||
|
||||
String getDescrizione(String paramString, int paramInt);
|
||||
|
||||
String getDescrizione(String paramString1, String paramString2);
|
||||
|
||||
String getDescrizione(String paramString1, String paramString2, int paramInt);
|
||||
|
||||
String getDescrizione(int paramInt);
|
||||
}
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
package com.ablia.common;
|
||||
|
||||
import com.ablia.db.ApplParmFull;
|
||||
import com.ablia.db.DBAdapter;
|
||||
import com.ablia.db.ResParm;
|
||||
import com.ablia.db.WcString;
|
||||
import com.ablia.util.StringTokenizer;
|
||||
import com.ablia.util.Vectumerator;
|
||||
import java.io.Serializable;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.SQLException;
|
||||
|
||||
public class TipoPostazione extends DBAdapter implements Serializable {
|
||||
private long id_tipoPostazione;
|
||||
|
||||
private String descrizione;
|
||||
|
||||
public TipoPostazione(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public TipoPostazione() {}
|
||||
|
||||
public void setId_tipoPostazione(long newId_tipoAzienda) {
|
||||
this.id_tipoPostazione = newId_tipoAzienda;
|
||||
}
|
||||
|
||||
public void setDescrizione(String newDescrizione) {
|
||||
this.descrizione = newDescrizione;
|
||||
}
|
||||
|
||||
public long getId_tipoPostazione() {
|
||||
return this.id_tipoPostazione;
|
||||
}
|
||||
|
||||
public String getDescrizione() {
|
||||
return (this.descrizione == null) ? "" : this.descrizione;
|
||||
}
|
||||
|
||||
protected ResParm checkDeleteCascade() {
|
||||
return new ResParm(true);
|
||||
}
|
||||
|
||||
protected void deleteCascade() {}
|
||||
|
||||
public Vectumerator findByCR(TipoPostazioneCR CR, int pageNumber, int pageRows) {
|
||||
String s_Sql_Find = "select A.* from TIPO_POSTAZIONE AS A";
|
||||
String s_Sql_Order = "";
|
||||
WcString wc = new WcString();
|
||||
if (!CR.getSearchTxt().trim().isEmpty()) {
|
||||
StringTokenizer st = new StringTokenizer(CR.getSearchTxt().trim(), " ");
|
||||
StringBuffer txt = new StringBuffer("(");
|
||||
while (st.hasMoreTokens()) {
|
||||
String token = st.nextToken();
|
||||
txt.append("(A.Cognome like '%" + token + "%' or A.Nome like '%" + token + "%')");
|
||||
if (st.hasMoreTokens())
|
||||
txt.append(" and ");
|
||||
}
|
||||
txt.append(")");
|
||||
wc.addWc(txt.toString());
|
||||
}
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(String.valueOf(s_Sql_Find) + wc.toString() + s_Sql_Order);
|
||||
return findRows(stmt, pageNumber, pageRows);
|
||||
} catch (SQLException e) {
|
||||
handleDebug(e);
|
||||
return AB_EMPTY_VECTUMERATOR;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
package com.ablia.common;
|
||||
|
||||
import com.ablia.db.ApplParmFull;
|
||||
import com.ablia.db.CRAdapter;
|
||||
|
||||
public class TipoPostazioneCR extends CRAdapter {
|
||||
private long id_tipoPostazione;
|
||||
|
||||
private String descrizione;
|
||||
|
||||
public TipoPostazioneCR(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public TipoPostazioneCR() {}
|
||||
|
||||
public void setId_tipoPostazione(long newId_tipoAzienda) {
|
||||
this.id_tipoPostazione = newId_tipoAzienda;
|
||||
}
|
||||
|
||||
public void setDescrizione(String newDescrizione) {
|
||||
this.descrizione = newDescrizione;
|
||||
}
|
||||
|
||||
public long getId_tipoPostazione() {
|
||||
return this.id_tipoPostazione;
|
||||
}
|
||||
|
||||
public String getDescrizione() {
|
||||
return (this.descrizione == null) ? "" : this.descrizione;
|
||||
}
|
||||
}
|
||||
177
rus/WEB-INF/lib/ablia_src/com/ablia/common/TtFont.java
Normal file
177
rus/WEB-INF/lib/ablia_src/com/ablia/common/TtFont.java
Normal file
|
|
@ -0,0 +1,177 @@
|
|||
package com.ablia.common;
|
||||
|
||||
import com.ablia.db.ApplParmFull;
|
||||
import com.ablia.db.DBAdapter;
|
||||
import com.ablia.db.ResParm;
|
||||
import com.ablia.util.Vectumerator;
|
||||
import com.lowagie.text.Font;
|
||||
import com.lowagie.text.pdf.BaseFont;
|
||||
import java.awt.Color;
|
||||
import java.io.File;
|
||||
import java.util.Enumeration;
|
||||
import java.util.Hashtable;
|
||||
|
||||
public class TtFont extends DBAdapter {
|
||||
private String ttfName;
|
||||
|
||||
private String ttfPath;
|
||||
|
||||
private Parm parm;
|
||||
|
||||
private static Hashtable fonts;
|
||||
|
||||
private static final Font PDF_f_Default = new Font(2, 10.0F,
|
||||
0);
|
||||
|
||||
private static final int PDF_fsize_Default = 10;
|
||||
|
||||
private static TtFont ttFontInstance;
|
||||
|
||||
static final String WIN_DEFAULT_TTF_PATH = "C:/windows/fonts/";
|
||||
|
||||
private TtFont() {}
|
||||
|
||||
private TtFont(ApplParmFull newApplParmFull) {
|
||||
setApFull(newApplParmFull);
|
||||
}
|
||||
|
||||
public ResParm delete() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public Vectumerator findAll() {
|
||||
int numRec = 0;
|
||||
File dir = new File(getTtfPath());
|
||||
File[] fonts = dir.listFiles();
|
||||
if (fonts != null) {
|
||||
File theFont = null;
|
||||
Vectumerator<TtFont> vec = new Vectumerator();
|
||||
try {
|
||||
for (int i = 0; i < fonts.length; i++) {
|
||||
theFont = fonts[i];
|
||||
if (theFont.getName().toLowerCase().endsWith("ttf")) {
|
||||
numRec++;
|
||||
TtFont myBean = new TtFont(getApFull());
|
||||
myBean.setTtfName(theFont.getName());
|
||||
vec.addElement(myBean);
|
||||
}
|
||||
}
|
||||
vec.setTotNumberOfRecords(numRec);
|
||||
return vec;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return DBAdapter.AB_EMPTY_VECTUMERATOR;
|
||||
}
|
||||
}
|
||||
return DBAdapter.AB_EMPTY_VECTUMERATOR;
|
||||
}
|
||||
|
||||
public void findByPrimaryKey(Object obj) {}
|
||||
|
||||
public int getDBState() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
public String getTtfPath() {
|
||||
return String.valueOf(getDocBase()) + "admin/_V4/_font/";
|
||||
}
|
||||
|
||||
public ResParm save() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public void setNuovaIstanzaOggettoRemoto(boolean flag) {}
|
||||
|
||||
public Object[] getFieldSetArg(String parmValue, Class type) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public void setTtfPath(String ttfPath) {
|
||||
this.ttfPath = ttfPath;
|
||||
}
|
||||
|
||||
public String getTtfName() {
|
||||
return this.ttfName;
|
||||
}
|
||||
|
||||
public void setTtfName(String ttfName) {
|
||||
this.ttfName = ttfName;
|
||||
}
|
||||
|
||||
public String getTtf() {
|
||||
return String.valueOf(getTtfPath()) + getTtfName();
|
||||
}
|
||||
|
||||
protected ResParm checkDeleteCascade() {
|
||||
return new ResParm(true);
|
||||
}
|
||||
|
||||
protected void deleteCascade() {}
|
||||
|
||||
public Parm getParm(String theKey) {
|
||||
if (this.parm == null)
|
||||
this.parm = new Parm(getApFull());
|
||||
try {
|
||||
this.parm.findByCodice(theKey);
|
||||
return this.parm;
|
||||
} catch (Exception e) {
|
||||
handleDebug(e);
|
||||
return this.parm;
|
||||
}
|
||||
}
|
||||
|
||||
public Font getFont(String baseFont, int size, int type, Color theColor) {
|
||||
Long fontKey = new Long(
|
||||
(long)(baseFont.hashCode() + size + type + ((theColor == null) ? 0 : theColor.hashCode())));
|
||||
if (!getFonts().containsKey(fontKey))
|
||||
try {
|
||||
Font ft;
|
||||
if (baseFont.isEmpty()) {
|
||||
ft = PDF_f_Default;
|
||||
} else {
|
||||
BaseFont bf = BaseFont.createFont(baseFont,
|
||||
"Identity-H", true);
|
||||
int fontSize = size;
|
||||
if (fontSize <= 0)
|
||||
fontSize = 10;
|
||||
if (theColor == null) {
|
||||
ft = new Font(bf, (float)fontSize, type, Color.black);
|
||||
} else {
|
||||
ft = new Font(bf, (float)fontSize, type, theColor);
|
||||
}
|
||||
}
|
||||
getFonts().put(fontKey, ft);
|
||||
return ft;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return PDF_f_Default;
|
||||
}
|
||||
return (Font)getFonts().get(fontKey);
|
||||
}
|
||||
|
||||
protected boolean isDatabaseBean() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static synchronized TtFont getInstance(ApplParmFull ap) {
|
||||
if (ttFontInstance == null)
|
||||
ttFontInstance = new TtFont(ap);
|
||||
return ttFontInstance;
|
||||
}
|
||||
|
||||
public static synchronized void reset() {
|
||||
Enumeration<Font> enu = getFonts().elements();
|
||||
while (enu.hasMoreElements()) {
|
||||
Font row = enu.nextElement();
|
||||
getFonts().remove(row);
|
||||
row = null;
|
||||
}
|
||||
fonts = null;
|
||||
}
|
||||
|
||||
private static Hashtable getFonts() {
|
||||
if (fonts == null)
|
||||
fonts = new Hashtable();
|
||||
return fonts;
|
||||
}
|
||||
}
|
||||
121
rus/WEB-INF/lib/ablia_src/com/ablia/common/UserAccess.java
Normal file
121
rus/WEB-INF/lib/ablia_src/com/ablia/common/UserAccess.java
Normal file
|
|
@ -0,0 +1,121 @@
|
|||
package com.ablia.common;
|
||||
|
||||
import com.ablia.db.ApplParmFull;
|
||||
import com.ablia.db.DBAdapter;
|
||||
import com.ablia.db.ResParm;
|
||||
import com.ablia.db.WcString;
|
||||
import com.ablia.util.Vectumerator;
|
||||
import java.io.Serializable;
|
||||
import java.sql.PreparedStatement;
|
||||
|
||||
public class UserAccess extends DBAdapter implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private long flgRW;
|
||||
|
||||
private String id_access;
|
||||
|
||||
private long id_userAccess;
|
||||
|
||||
private Access access;
|
||||
|
||||
private Users users;
|
||||
|
||||
private long id_users;
|
||||
|
||||
public Vectumerator findAccesssByUser(long l_id_user, int pageNumber, int pageRows) {
|
||||
String s_Sql_Find = "select A.* from USER_ACCESS AS A, ACCESS AS B";
|
||||
String s_Sql_Order = " order by B.descrizione";
|
||||
WcString wc = new WcString();
|
||||
wc.addWc("A.id_access =B.id_access");
|
||||
wc.addWc("A.id_users =" + l_id_user);
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(String.valueOf(s_Sql_Find) + wc.toString() + s_Sql_Order);
|
||||
return findRows(stmt, pageNumber, pageRows);
|
||||
} catch (Exception e) {
|
||||
handleDebug(e);
|
||||
return AB_EMPTY_VECTUMERATOR;
|
||||
}
|
||||
}
|
||||
|
||||
public UserAccess() {}
|
||||
|
||||
public UserAccess(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
protected ResParm checkDeleteCascade() {
|
||||
return new ResParm(true);
|
||||
}
|
||||
|
||||
protected void deleteCascade() {}
|
||||
|
||||
public long getFlgRW() {
|
||||
return this.flgRW;
|
||||
}
|
||||
|
||||
public String getRW() {
|
||||
return DBAdapter.getRW(getFlgRW());
|
||||
}
|
||||
|
||||
public String getId_access() {
|
||||
return (this.id_access == null) ? "" : this.id_access;
|
||||
}
|
||||
|
||||
public long getId_users() {
|
||||
return this.id_users;
|
||||
}
|
||||
|
||||
public Access getAccess() {
|
||||
this.access = (Access)getSecondaryObject(this.access, Access.class, getId_access());
|
||||
return this.access;
|
||||
}
|
||||
|
||||
public Users getUsers() {
|
||||
this.users = (Users)getSecondaryObject(this.users, Users.class, new Long(getId_users()));
|
||||
return this.users;
|
||||
}
|
||||
|
||||
public void setFlgRW(long newFlgRW) {
|
||||
this.flgRW = newFlgRW;
|
||||
}
|
||||
|
||||
public void setId_access(String newId_access) {
|
||||
this.id_access = newId_access;
|
||||
setAccess(null);
|
||||
}
|
||||
|
||||
public void setId_users(long newId_user) {
|
||||
this.id_users = newId_user;
|
||||
setUsers(null);
|
||||
}
|
||||
|
||||
public void setAccess(Access newAccess) {
|
||||
this.access = newAccess;
|
||||
}
|
||||
|
||||
public void setUsers(Users newUser) {
|
||||
this.users = newUser;
|
||||
}
|
||||
|
||||
public long getId_userAccess() {
|
||||
return this.id_userAccess;
|
||||
}
|
||||
|
||||
public void setId_userAccess(long id_userAccess) {
|
||||
this.id_userAccess = id_userAccess;
|
||||
}
|
||||
|
||||
public void findByUserAccess(long l_id_user, String l_id_access) {
|
||||
String s_Sql_Find = "select A.* from USER_ACCESS AS A";
|
||||
WcString wc = new WcString();
|
||||
wc.addWc("A.id_users =" + l_id_user);
|
||||
wc.addWc("A.id_access ='" + l_id_access + "'");
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(String.valueOf(s_Sql_Find) + wc.toString());
|
||||
findFirstRecord(stmt);
|
||||
} catch (Exception e) {
|
||||
handleDebug(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
172
rus/WEB-INF/lib/ablia_src/com/ablia/common/UserAccessGroup.java
Normal file
172
rus/WEB-INF/lib/ablia_src/com/ablia/common/UserAccessGroup.java
Normal file
|
|
@ -0,0 +1,172 @@
|
|||
package com.ablia.common;
|
||||
|
||||
import com.ablia.db.ApplParmFull;
|
||||
import com.ablia.db.DBAdapter;
|
||||
import com.ablia.db.ResParm;
|
||||
import com.ablia.db.WcString;
|
||||
import com.ablia.util.StringTokenizer;
|
||||
import com.ablia.util.Vectumerator;
|
||||
import java.io.Serializable;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.SQLException;
|
||||
|
||||
public class UserAccessGroup extends DBAdapter implements Serializable {
|
||||
private long id_userAccessGroup;
|
||||
|
||||
private long id_accessGroup;
|
||||
|
||||
private long id_users;
|
||||
|
||||
private AccessGroup accessGroup;
|
||||
|
||||
private Users users;
|
||||
|
||||
public UserAccessGroup(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public UserAccessGroup() {}
|
||||
|
||||
public void setId_userAccessGroup(long newId_userAccessGroup) {
|
||||
this.id_userAccessGroup = newId_userAccessGroup;
|
||||
}
|
||||
|
||||
public void setId_accessGroup(long newId_accessGroup) {
|
||||
this.id_accessGroup = newId_accessGroup;
|
||||
setAccessGroup(null);
|
||||
}
|
||||
|
||||
public void setId_users(long newId_users) {
|
||||
this.id_users = newId_users;
|
||||
setUsers(null);
|
||||
}
|
||||
|
||||
public long getId_userAccessGroup() {
|
||||
return this.id_userAccessGroup;
|
||||
}
|
||||
|
||||
public long getId_accessGroup() {
|
||||
return this.id_accessGroup;
|
||||
}
|
||||
|
||||
public long getId_users() {
|
||||
return this.id_users;
|
||||
}
|
||||
|
||||
public void setAccessGroup(AccessGroup newAccessGroup) {
|
||||
this.accessGroup = newAccessGroup;
|
||||
}
|
||||
|
||||
public AccessGroup getAccessGroup() {
|
||||
this.accessGroup = (AccessGroup)getSecondaryObject((DBAdapter)this.accessGroup,
|
||||
AccessGroup.class, getId_accessGroup());
|
||||
return this.accessGroup;
|
||||
}
|
||||
|
||||
public void setUsers(Users newUsers) {
|
||||
this.users = newUsers;
|
||||
}
|
||||
|
||||
public Users getUsers() {
|
||||
this.users = (Users)getSecondaryObject((DBAdapter)this.users, Users.class, getId_users());
|
||||
return this.users;
|
||||
}
|
||||
|
||||
protected ResParm checkDeleteCascade() {
|
||||
return new ResParm(true);
|
||||
}
|
||||
|
||||
protected void deleteCascade() {}
|
||||
|
||||
public Vectumerator findByCR(UserAccessGroupCR CR, int pageNumber, int pageRows) {
|
||||
String s_Sql_Find = "select A.* from USER_ACCESS_GROUP AS A";
|
||||
String s_Sql_Order = "";
|
||||
WcString wc = new WcString();
|
||||
if (!CR.getSearchTxt().trim().isEmpty()) {
|
||||
StringTokenizer st = new StringTokenizer(CR.getSearchTxt().trim(),
|
||||
" ");
|
||||
StringBuffer txt = new StringBuffer("(");
|
||||
while (st.hasMoreTokens()) {
|
||||
String token = st.nextToken();
|
||||
txt.append("(A.descrizione like '%" + token + "%')");
|
||||
if (st.hasMoreTokens())
|
||||
txt.append(" and ");
|
||||
}
|
||||
txt.append(")");
|
||||
wc.addWc(txt.toString());
|
||||
}
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(
|
||||
String.valueOf(s_Sql_Find) + wc.toString() + s_Sql_Order);
|
||||
return findRows(stmt, pageNumber, pageRows);
|
||||
} catch (SQLException e) {
|
||||
handleDebug(e);
|
||||
return AB_EMPTY_VECTUMERATOR;
|
||||
}
|
||||
}
|
||||
|
||||
public Vectumerator findByUser(long l_id_user, int pageNumber, int pageRows) {
|
||||
String s_Sql_Find = "select A.* from USER_ACCESS_GROUP AS A, USERS as B, ACCESS_GROUP AS C";
|
||||
String s_Sql_Order = " order by C.descrizione, B.cognome, B.nome";
|
||||
WcString wc = new WcString();
|
||||
wc.addWc("A.id_users =B.id_users");
|
||||
wc.addWc("A.id_accessGroup =C.id_accessGroup");
|
||||
wc.addWc("A.id_users =" + l_id_user);
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(
|
||||
String.valueOf(s_Sql_Find) + wc + s_Sql_Order);
|
||||
return findRows(stmt, pageNumber, pageRows);
|
||||
} catch (Exception e) {
|
||||
handleDebug(e);
|
||||
return AB_EMPTY_VECTUMERATOR;
|
||||
}
|
||||
}
|
||||
|
||||
public Vectumerator findByAccessGroup(long l_id_accessGroup, int pageNumber, int pageRows) {
|
||||
String s_Sql_Find = "select A.* from USER_ACCESS_GROUP AS A, USERS AS B, ACCESS_GROUP AS C";
|
||||
String s_Sql_Order = " order by C.descrizione, B.cognome, B.nome";
|
||||
WcString wc = new WcString();
|
||||
wc.addWc("A.id_users =B.id_users");
|
||||
wc.addWc("A.id_accessGroup=C.id_accessGroup");
|
||||
wc.addWc("A.id_accessGroup =" + l_id_accessGroup);
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(
|
||||
String.valueOf(s_Sql_Find) + wc + s_Sql_Order);
|
||||
return findRows(stmt, pageNumber, pageRows);
|
||||
} catch (Exception e) {
|
||||
handleDebug(e);
|
||||
return AB_EMPTY_VECTUMERATOR;
|
||||
}
|
||||
}
|
||||
|
||||
public void findByAccessGroupUser(long l_id_accessGroup, long l_id_user) {
|
||||
String s_Sql_Find = "select A.* from USER_ACCESS_GROUP AS A";
|
||||
String wc = "";
|
||||
wc = buildWc(wc, "A.id_users =" + l_id_user);
|
||||
wc = buildWc(wc, "A.id_accessGroup =" + l_id_accessGroup);
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(
|
||||
String.valueOf(s_Sql_Find) + wc);
|
||||
findFirstRecord(stmt);
|
||||
} catch (Exception e) {
|
||||
handleDebug(e);
|
||||
}
|
||||
}
|
||||
|
||||
public void findByAccessUser(String l_id_access, long l_id_user) {
|
||||
String s_Sql_Find = "select A.* from USER_ACCESS_GROUP AS A, ACCESS_GROUP_ACCESS AS B, ACCESS AS C";
|
||||
String s_Sql_Order = " order by C.descrizione";
|
||||
WcString wc = new WcString();
|
||||
wc.addWc("A.id_accessGroup =B.id_accessGroup");
|
||||
wc.addWc("B.id_access=C.id_access");
|
||||
wc.addWc("A.id_users =" + l_id_user);
|
||||
wc.addWc("B.id_access ='" + l_id_access + "'");
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(
|
||||
String.valueOf(s_Sql_Find) + wc + s_Sql_Order);
|
||||
findFirstRecord(stmt);
|
||||
} catch (Exception e) {
|
||||
handleDebug(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
package com.ablia.common;
|
||||
|
||||
import com.ablia.db.ApplParmFull;
|
||||
import com.ablia.db.CRAdapter;
|
||||
import com.ablia.db.DBAdapter;
|
||||
|
||||
public class UserAccessGroupCR extends CRAdapter {
|
||||
private long id_userAccessGroup;
|
||||
|
||||
private long id_accessGroup;
|
||||
|
||||
private long id_users;
|
||||
|
||||
private AccessGroup accessGroup;
|
||||
|
||||
private Users users;
|
||||
|
||||
public UserAccessGroupCR(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public UserAccessGroupCR() {}
|
||||
|
||||
public void setId_userAccessGroup(long newId_userAccessGroup) {
|
||||
this.id_userAccessGroup = newId_userAccessGroup;
|
||||
}
|
||||
|
||||
public void setId_accessGroup(long newId_accessGroup) {
|
||||
this.id_accessGroup = newId_accessGroup;
|
||||
setAccessGroup(null);
|
||||
}
|
||||
|
||||
public void setId_users(long newId_users) {
|
||||
this.id_users = newId_users;
|
||||
setUsers(null);
|
||||
}
|
||||
|
||||
public long getId_userAccessGroup() {
|
||||
return this.id_userAccessGroup;
|
||||
}
|
||||
|
||||
public long getId_accessGroup() {
|
||||
return this.id_accessGroup;
|
||||
}
|
||||
|
||||
public long getId_users() {
|
||||
return this.id_users;
|
||||
}
|
||||
|
||||
public void setAccessGroup(AccessGroup newAccessGroup) {
|
||||
this.accessGroup = newAccessGroup;
|
||||
}
|
||||
|
||||
public AccessGroup getAccessGroup() {
|
||||
this.accessGroup = (AccessGroup)getSecondaryObject(
|
||||
(DBAdapter)this.accessGroup,
|
||||
AccessGroup.class, getId_accessGroup());
|
||||
return this.accessGroup;
|
||||
}
|
||||
|
||||
public void setUsers(Users newUsers) {
|
||||
this.users = newUsers;
|
||||
}
|
||||
|
||||
public Users getUsers() {
|
||||
this.users = (Users)getSecondaryObject(
|
||||
(DBAdapter)this.users,
|
||||
Users.class, getId_users());
|
||||
return this.users;
|
||||
}
|
||||
}
|
||||
148
rus/WEB-INF/lib/ablia_src/com/ablia/common/UserProfile.java
Normal file
148
rus/WEB-INF/lib/ablia_src/com/ablia/common/UserProfile.java
Normal file
|
|
@ -0,0 +1,148 @@
|
|||
package com.ablia.common;
|
||||
|
||||
import com.ablia.db.ApplParmFull;
|
||||
import com.ablia.db.DBAdapter;
|
||||
import com.ablia.db.ResParm;
|
||||
import com.ablia.util.Vectumerator;
|
||||
import java.io.Serializable;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.util.Hashtable;
|
||||
import java.util.StringTokenizer;
|
||||
|
||||
public class UserProfile extends DBAdapter implements Serializable {
|
||||
private long id_userProfile;
|
||||
|
||||
private String descrizione;
|
||||
|
||||
private String policy;
|
||||
|
||||
public UserProfile() {}
|
||||
|
||||
public UserProfile(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
protected ResParm checkDeleteCascade() {
|
||||
return new ResParm(true);
|
||||
}
|
||||
|
||||
public boolean checkRights(long l_id_profiloUtente) {
|
||||
if (getPolicy().equals("*"))
|
||||
return true;
|
||||
StringTokenizer st = new StringTokenizer(getPolicy(), ",");
|
||||
while (st.hasMoreTokens()) {
|
||||
if (l_id_profiloUtente == Long.parseLong(st.nextToken()))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
protected void deleteCascade() {}
|
||||
|
||||
public void fillObject(Hashtable htable) {}
|
||||
|
||||
public Vectumerator findProfiles(String l_listaProfili) {
|
||||
String s_Sql_Find = "select A.* from USER_PROFILE AS A";
|
||||
String wc = "";
|
||||
if (l_listaProfili.equals("#")) {
|
||||
wc = " where id_userProfile is null";
|
||||
} else if (!l_listaProfili.equals("*")) {
|
||||
StringTokenizer st = new StringTokenizer(l_listaProfili, ",");
|
||||
while (st.hasMoreTokens()) {
|
||||
if (!wc.isEmpty()) {
|
||||
wc = String.valueOf(wc) + " or id_userProfile=" + st.nextToken();
|
||||
continue;
|
||||
}
|
||||
wc = " where id_userProfile=" + st.nextToken();
|
||||
}
|
||||
}
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(String.valueOf(s_Sql_Find) + wc);
|
||||
return findRows(stmt);
|
||||
} catch (Exception e) {
|
||||
handleDebug(e);
|
||||
return AB_EMPTY_VECTUMERATOR;
|
||||
}
|
||||
}
|
||||
|
||||
public Vectumerator findUserProfiles() {
|
||||
String s_Sql_Find = "select A.* from USER_PROFILE AS A";
|
||||
String wc = " where id_userProfile !=1";
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(String.valueOf(s_Sql_Find) + wc);
|
||||
return findRows(stmt);
|
||||
} catch (Exception e) {
|
||||
handleDebug(e);
|
||||
return AB_EMPTY_VECTUMERATOR;
|
||||
}
|
||||
}
|
||||
|
||||
public Vectumerator findUserProfiles(String policy) {
|
||||
String s_Sql_Find = "select A.* from USER_PROFILE AS A";
|
||||
String wc = "";
|
||||
wc = managePolicyFind(policy, wc);
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(String.valueOf(s_Sql_Find) + wc);
|
||||
return findRows(stmt);
|
||||
} catch (Exception e) {
|
||||
handleDebug(e);
|
||||
return AB_EMPTY_VECTUMERATOR;
|
||||
}
|
||||
}
|
||||
|
||||
public String getDescrizione() {
|
||||
return (this.descrizione == null) ? "" : this.descrizione;
|
||||
}
|
||||
|
||||
public long getId_userProfile() {
|
||||
return this.id_userProfile;
|
||||
}
|
||||
|
||||
public String getPolicy() {
|
||||
if (getId_userProfile() == 1L)
|
||||
return "*";
|
||||
return (this.policy == null) ? "#" : this.policy;
|
||||
}
|
||||
|
||||
protected String managePolicyFind(String policy, String l_wc) {
|
||||
if (policy.equals("#") || policy.isEmpty()) {
|
||||
l_wc = buildWc(l_wc, "A.id_userProfile is null");
|
||||
} else if (!policy.equals("*")) {
|
||||
StringTokenizer st = new StringTokenizer(policy, ",");
|
||||
String l_wcOr = "";
|
||||
while (st.hasMoreTokens()) {
|
||||
if (!l_wcOr.isEmpty()) {
|
||||
l_wcOr = String.valueOf(l_wcOr) + " or id_userProfile=" + st.nextToken();
|
||||
continue;
|
||||
}
|
||||
l_wcOr = " id_userProfile=" + st.nextToken();
|
||||
}
|
||||
l_wc = buildWc(l_wc, "(" + l_wcOr + ")");
|
||||
}
|
||||
return l_wc;
|
||||
}
|
||||
|
||||
public void setDescrizione(String newDescrizione) {
|
||||
this.descrizione = newDescrizione;
|
||||
}
|
||||
|
||||
public void setId_userProfile(long newId_profiloUtente) {
|
||||
this.id_userProfile = newId_profiloUtente;
|
||||
}
|
||||
|
||||
public void setPolicy(String newPolicy) {
|
||||
this.policy = newPolicy;
|
||||
}
|
||||
|
||||
protected void setPrimaryKey(long newPrimaryKey) {
|
||||
setId_userProfile(newPrimaryKey);
|
||||
}
|
||||
|
||||
protected boolean isUseSafeUpdate() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public Vectumerator findByCR(UserProfileCR CR, int pageNumber, int pageRows) {
|
||||
return findAll();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
package com.ablia.common;
|
||||
|
||||
import com.ablia.db.ApplParmFull;
|
||||
import com.ablia.db.CRAdapter;
|
||||
|
||||
public class UserProfileCR extends CRAdapter {
|
||||
private String descrizioneS;
|
||||
|
||||
public UserProfileCR() {}
|
||||
|
||||
public UserProfileCR(ApplParmFull newAp) {
|
||||
super(newAp);
|
||||
}
|
||||
|
||||
public String getDescrizioneS() {
|
||||
return (this.descrizioneS == null) ? "" : this.descrizioneS.trim();
|
||||
}
|
||||
|
||||
public void setDescrizioneS(String descrizioneS) {
|
||||
this.descrizioneS = descrizioneS;
|
||||
}
|
||||
}
|
||||
109
rus/WEB-INF/lib/ablia_src/com/ablia/common/UserWhitelist.java
Normal file
109
rus/WEB-INF/lib/ablia_src/com/ablia/common/UserWhitelist.java
Normal file
|
|
@ -0,0 +1,109 @@
|
|||
package com.ablia.common;
|
||||
|
||||
import com.ablia.db.ApplParmFull;
|
||||
import com.ablia.db.DBAdapter;
|
||||
import com.ablia.db.ResParm;
|
||||
import com.ablia.db.WcString;
|
||||
import com.ablia.util.StringTokenizer;
|
||||
import com.ablia.util.Vectumerator;
|
||||
import java.io.Serializable;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.SQLException;
|
||||
|
||||
public class UserWhitelist extends DBAdapter implements Serializable {
|
||||
private long id_userWhitelist;
|
||||
|
||||
private long id_whitelist;
|
||||
|
||||
private long id_users;
|
||||
|
||||
private Whitelist whitelist;
|
||||
|
||||
private Users users;
|
||||
|
||||
public UserWhitelist(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public UserWhitelist() {}
|
||||
|
||||
public void setId_userWhitelist(long newId_usersWhitelist) {
|
||||
this.id_userWhitelist = newId_usersWhitelist;
|
||||
}
|
||||
|
||||
public void setId_whitelist(long newId_whitelist) {
|
||||
this.id_whitelist = newId_whitelist;
|
||||
setWhitelist(null);
|
||||
}
|
||||
|
||||
public void setId_users(long newId_users) {
|
||||
this.id_users = newId_users;
|
||||
setUsers(null);
|
||||
}
|
||||
|
||||
public long getId_userWhitelist() {
|
||||
return this.id_userWhitelist;
|
||||
}
|
||||
|
||||
public long getId_whitelist() {
|
||||
return this.id_whitelist;
|
||||
}
|
||||
|
||||
public long getId_users() {
|
||||
return this.id_users;
|
||||
}
|
||||
|
||||
public void setWhitelist(Whitelist newWhitelist) {
|
||||
this.whitelist = newWhitelist;
|
||||
}
|
||||
|
||||
public Whitelist getWhitelist() {
|
||||
this.whitelist = (Whitelist)getSecondaryObject(
|
||||
(DBAdapter)this.whitelist,
|
||||
Whitelist.class, getId_whitelist());
|
||||
return this.whitelist;
|
||||
}
|
||||
|
||||
public void setUsers(Users newUsers) {
|
||||
this.users = newUsers;
|
||||
}
|
||||
|
||||
public Users getUsers() {
|
||||
this.users = (Users)getSecondaryObject(
|
||||
(DBAdapter)this.users,
|
||||
Users.class, getId_users());
|
||||
return this.users;
|
||||
}
|
||||
|
||||
protected ResParm checkDeleteCascade() {
|
||||
return new ResParm(true);
|
||||
}
|
||||
|
||||
protected void deleteCascade() {}
|
||||
|
||||
public Vectumerator findByCR(UserWhitelistCR CR, int pageNumber, int pageRows) {
|
||||
String s_Sql_Find = "select A.* from USERS_WHITELIST AS A";
|
||||
String s_Sql_Order = "";
|
||||
WcString wc = new WcString();
|
||||
if (!CR.getSearchTxt().trim().isEmpty()) {
|
||||
StringTokenizer st = new StringTokenizer(CR.getSearchTxt().trim(), " ");
|
||||
StringBuffer txt = new StringBuffer("(");
|
||||
while (st.hasMoreTokens()) {
|
||||
String token = st.nextToken();
|
||||
txt.append("(A.Cognome like '%" + token + "%' or A.Nome like '%" + token + "%')");
|
||||
if (st.hasMoreTokens())
|
||||
txt.append(" and ");
|
||||
}
|
||||
txt.append(")");
|
||||
wc.addWc(txt.toString());
|
||||
}
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(String.valueOf(s_Sql_Find) + wc.toString() + s_Sql_Order);
|
||||
return findRows(stmt, pageNumber, pageRows);
|
||||
} catch (SQLException e) {
|
||||
removeCPConnection();
|
||||
handleDebug(e);
|
||||
return AB_EMPTY_VECTUMERATOR;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
package com.ablia.common;
|
||||
|
||||
import com.ablia.db.ApplParmFull;
|
||||
import com.ablia.db.CRAdapter;
|
||||
import com.ablia.db.DBAdapter;
|
||||
|
||||
public class UserWhitelistCR extends CRAdapter {
|
||||
private long id_userWhitelist;
|
||||
|
||||
private long id_whitelist;
|
||||
|
||||
private long id_users;
|
||||
|
||||
private Whitelist whitelist;
|
||||
|
||||
private Users users;
|
||||
|
||||
public UserWhitelistCR(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public UserWhitelistCR() {}
|
||||
|
||||
public void setId_userWhitelist(long newId_usersWhitelist) {
|
||||
this.id_userWhitelist = newId_usersWhitelist;
|
||||
}
|
||||
|
||||
public void setId_whitelist(long newId_whitelist) {
|
||||
this.id_whitelist = newId_whitelist;
|
||||
setWhitelist(null);
|
||||
}
|
||||
|
||||
public void setId_users(long newId_users) {
|
||||
this.id_users = newId_users;
|
||||
setUsers(null);
|
||||
}
|
||||
|
||||
public long getId_userWhitelist() {
|
||||
return this.id_userWhitelist;
|
||||
}
|
||||
|
||||
public long getId_whitelist() {
|
||||
return this.id_whitelist;
|
||||
}
|
||||
|
||||
public long getId_users() {
|
||||
return this.id_users;
|
||||
}
|
||||
|
||||
public void setWhitelist(Whitelist newWhitelist) {
|
||||
this.whitelist = newWhitelist;
|
||||
}
|
||||
|
||||
public Whitelist getWhitelist() {
|
||||
this.whitelist = (Whitelist)getSecondaryObject(
|
||||
(DBAdapter)this.whitelist,
|
||||
Whitelist.class, getId_whitelist());
|
||||
return this.whitelist;
|
||||
}
|
||||
|
||||
public void setUsers(Users newUsers) {
|
||||
this.users = newUsers;
|
||||
}
|
||||
|
||||
public Users getUsers() {
|
||||
this.users = (Users)getSecondaryObject(
|
||||
(DBAdapter)this.users,
|
||||
Users.class, getId_users());
|
||||
return this.users;
|
||||
}
|
||||
}
|
||||
2242
rus/WEB-INF/lib/ablia_src/com/ablia/common/Users.java
Normal file
2242
rus/WEB-INF/lib/ablia_src/com/ablia/common/Users.java
Normal file
File diff suppressed because it is too large
Load diff
176
rus/WEB-INF/lib/ablia_src/com/ablia/common/UsersCR.java
Normal file
176
rus/WEB-INF/lib/ablia_src/com/ablia/common/UsersCR.java
Normal file
|
|
@ -0,0 +1,176 @@
|
|||
package com.ablia.common;
|
||||
|
||||
import com.ablia.db.ApplParmFull;
|
||||
import com.ablia.db.CRAdapter;
|
||||
|
||||
public class UsersCR extends CRAdapter {
|
||||
private String flgValido;
|
||||
|
||||
private boolean code1 = false;
|
||||
|
||||
private long id_userProfile;
|
||||
|
||||
private String policy;
|
||||
|
||||
private UserProfile userProfile;
|
||||
|
||||
private String txtRicerca;
|
||||
|
||||
private String cognome;
|
||||
|
||||
private String eMail;
|
||||
|
||||
private String login;
|
||||
|
||||
private String nome;
|
||||
|
||||
private long flgPresenza = -1L;
|
||||
|
||||
private String codFisc;
|
||||
|
||||
private long flgMl = -1L;
|
||||
|
||||
private long flgControlCode = -1L;
|
||||
|
||||
private long id_usersS;
|
||||
|
||||
public UsersCR() {}
|
||||
|
||||
public UsersCR(Users theUser) {
|
||||
setPolicy(theUser.getUserProfile().getPolicy());
|
||||
}
|
||||
|
||||
public UsersCR(ApplParmFull newAp) {
|
||||
setApFull(newAp);
|
||||
}
|
||||
|
||||
public UsersCR(ApplParmFull newAp, Users theUser) {
|
||||
setApFull(newAp);
|
||||
setPolicy(theUser.getUserProfile().getPolicy());
|
||||
}
|
||||
|
||||
public String getFlgValido() {
|
||||
return (this.flgValido == null) ? "" : this.flgValido;
|
||||
}
|
||||
|
||||
public long getId_userProfile() {
|
||||
return this.id_userProfile;
|
||||
}
|
||||
|
||||
public String getPolicy() {
|
||||
return (this.policy == null) ? "" : this.policy;
|
||||
}
|
||||
|
||||
public UserProfile getUserProfile() {
|
||||
if (this.userProfile == null && getId_userProfile() != 0L)
|
||||
try {
|
||||
this.userProfile = new UserProfile(getApFull());
|
||||
this.userProfile.findByPrimaryKey(new Long(getId_userProfile()));
|
||||
} catch (Exception e) {}
|
||||
return (this.userProfile == null) ? new UserProfile() : this.userProfile;
|
||||
}
|
||||
|
||||
public String getTxtRicerca() {
|
||||
return (this.txtRicerca == null) ? "" : this.txtRicerca;
|
||||
}
|
||||
|
||||
public void setFlgValido(String newFlgValido) {
|
||||
this.flgValido = newFlgValido;
|
||||
}
|
||||
|
||||
public void setId_userProfile(long newId_profiloUtente) {
|
||||
this.id_userProfile = newId_profiloUtente;
|
||||
}
|
||||
|
||||
public void setPolicy(String newPolicy) {
|
||||
this.policy = newPolicy;
|
||||
}
|
||||
|
||||
public void setUserProfile(UserProfile newProfiloUtente) {
|
||||
this.userProfile = newProfiloUtente;
|
||||
}
|
||||
|
||||
public void setTxtRicerca(String newTxtRicerca) {
|
||||
this.txtRicerca = newTxtRicerca;
|
||||
}
|
||||
|
||||
public boolean isCode1() {
|
||||
return this.code1;
|
||||
}
|
||||
|
||||
public void setCode1(boolean code1) {
|
||||
this.code1 = code1;
|
||||
}
|
||||
|
||||
public String getCognome() {
|
||||
return (this.cognome == null) ? "" : this.cognome;
|
||||
}
|
||||
|
||||
public void setCognome(String cognome) {
|
||||
this.cognome = cognome;
|
||||
}
|
||||
|
||||
public String getEMail() {
|
||||
return (this.eMail == null) ? "" : this.eMail;
|
||||
}
|
||||
|
||||
public void setEMail(String mail) {
|
||||
this.eMail = mail;
|
||||
}
|
||||
|
||||
public String getLogin() {
|
||||
return (this.login == null) ? "" : this.login;
|
||||
}
|
||||
|
||||
public void setLogin(String login) {
|
||||
this.login = login;
|
||||
}
|
||||
|
||||
public String getNome() {
|
||||
return (this.nome == null) ? "" : this.nome;
|
||||
}
|
||||
|
||||
public void setNome(String nome) {
|
||||
this.nome = nome;
|
||||
}
|
||||
|
||||
public long getFlgPresenza() {
|
||||
return this.flgPresenza;
|
||||
}
|
||||
|
||||
public void setFlgPresenza(long flgPresenza) {
|
||||
this.flgPresenza = flgPresenza;
|
||||
}
|
||||
|
||||
public String getCodFisc() {
|
||||
return (this.codFisc == null) ? "" : this.codFisc.trim();
|
||||
}
|
||||
|
||||
public void setCodFisc(String codFisc) {
|
||||
this.codFisc = codFisc;
|
||||
}
|
||||
|
||||
public long getFlgMl() {
|
||||
return this.flgMl;
|
||||
}
|
||||
|
||||
public void setFlgMl(long flgMl) {
|
||||
this.flgMl = flgMl;
|
||||
}
|
||||
|
||||
public long getFlgControlCode() {
|
||||
return this.flgControlCode;
|
||||
}
|
||||
|
||||
public void setFlgControlCode(long flgControlCode) {
|
||||
this.flgControlCode = flgControlCode;
|
||||
}
|
||||
|
||||
public long getId_usersS() {
|
||||
return this.id_usersS;
|
||||
}
|
||||
|
||||
public void setId_usersS(long id_usersS) {
|
||||
this.id_usersS = id_usersS;
|
||||
}
|
||||
}
|
||||
57
rus/WEB-INF/lib/ablia_src/com/ablia/common/UsersI.java
Normal file
57
rus/WEB-INF/lib/ablia_src/com/ablia/common/UsersI.java
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
package com.ablia.common;
|
||||
|
||||
import com.ablia.db.ApplParmFull;
|
||||
import com.ablia.pre.Presenza;
|
||||
import java.util.Hashtable;
|
||||
|
||||
public interface UsersI {
|
||||
String getChangeLog();
|
||||
|
||||
long getId_userProfile();
|
||||
|
||||
long getFlgPresenza();
|
||||
|
||||
Presenza getUltimoMovimento();
|
||||
|
||||
long getNextMovValido();
|
||||
|
||||
String getCognomeNome();
|
||||
|
||||
String getDescrizione();
|
||||
|
||||
String getCognome();
|
||||
|
||||
String getNome();
|
||||
|
||||
UserProfile getUserProfile();
|
||||
|
||||
void initApplicationParms(ApplParmFull paramApplParmFull);
|
||||
|
||||
long getGrantType(String paramString);
|
||||
|
||||
long getGrantType(String paramString, boolean paramBoolean);
|
||||
|
||||
String translate(String paramString1, String paramString2);
|
||||
|
||||
long getId_users();
|
||||
|
||||
long getFlgChangeLog();
|
||||
|
||||
void resetChangeLog();
|
||||
|
||||
PostazioneI getPostazione();
|
||||
|
||||
String getScadenzaPasswordMessage();
|
||||
|
||||
long getGiorniAScadenzaPassword();
|
||||
|
||||
long getFlgSuper();
|
||||
|
||||
Hashtable<String, Long> getHtAccess();
|
||||
|
||||
String getImgFileName(int paramInt);
|
||||
|
||||
String getLogin();
|
||||
|
||||
String getLang();
|
||||
}
|
||||
81
rus/WEB-INF/lib/ablia_src/com/ablia/common/Whitelist.java
Normal file
81
rus/WEB-INF/lib/ablia_src/com/ablia/common/Whitelist.java
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
package com.ablia.common;
|
||||
|
||||
import com.ablia.db.ApplParmFull;
|
||||
import com.ablia.db.DBAdapter;
|
||||
import com.ablia.db.ResParm;
|
||||
import com.ablia.db.WcString;
|
||||
import com.ablia.util.StringTokenizer;
|
||||
import com.ablia.util.Vectumerator;
|
||||
import java.io.Serializable;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.SQLException;
|
||||
|
||||
public class Whitelist extends DBAdapter implements Serializable {
|
||||
private long id_whitelist;
|
||||
|
||||
private String descrizione;
|
||||
|
||||
private String ipAddress;
|
||||
|
||||
public Whitelist(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public Whitelist() {}
|
||||
|
||||
public void setId_whitelist(long newId_whitelist) {
|
||||
this.id_whitelist = newId_whitelist;
|
||||
}
|
||||
|
||||
public void setDescrizione(String newDescrizione) {
|
||||
this.descrizione = newDescrizione;
|
||||
}
|
||||
|
||||
public void setIpAddress(String newIpAddress) {
|
||||
this.ipAddress = newIpAddress;
|
||||
}
|
||||
|
||||
public long getId_whitelist() {
|
||||
return this.id_whitelist;
|
||||
}
|
||||
|
||||
public String getDescrizione() {
|
||||
return (this.descrizione == null) ? "" : this.descrizione.trim();
|
||||
}
|
||||
|
||||
public String getIpAddress() {
|
||||
return (this.ipAddress == null) ? "" : this.ipAddress.trim();
|
||||
}
|
||||
|
||||
protected ResParm checkDeleteCascade() {
|
||||
return new ResParm(true);
|
||||
}
|
||||
|
||||
protected void deleteCascade() {}
|
||||
|
||||
public Vectumerator findByCR(WhitelistCR CR, int pageNumber, int pageRows) {
|
||||
String s_Sql_Find = "select A.* from WHITELIST AS A";
|
||||
String s_Sql_Order = "";
|
||||
WcString wc = new WcString();
|
||||
if (!CR.getSearchTxt().trim().isEmpty()) {
|
||||
StringTokenizer st = new StringTokenizer(CR.getSearchTxt().trim(), " ");
|
||||
StringBuffer txt = new StringBuffer("(");
|
||||
while (st.hasMoreTokens()) {
|
||||
String token = st.nextToken();
|
||||
txt.append("(A.Cognome like '%" + token + "%' or A.Nome like '%" + token + "%')");
|
||||
if (st.hasMoreTokens())
|
||||
txt.append(" and ");
|
||||
}
|
||||
txt.append(")");
|
||||
wc.addWc(txt.toString());
|
||||
}
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(String.valueOf(s_Sql_Find) + wc.toString() + s_Sql_Order);
|
||||
return findRows(stmt, pageNumber, pageRows);
|
||||
} catch (SQLException e) {
|
||||
removeCPConnection();
|
||||
handleDebug(e);
|
||||
return AB_EMPTY_VECTUMERATOR;
|
||||
}
|
||||
}
|
||||
}
|
||||
42
rus/WEB-INF/lib/ablia_src/com/ablia/common/WhitelistCR.java
Normal file
42
rus/WEB-INF/lib/ablia_src/com/ablia/common/WhitelistCR.java
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
package com.ablia.common;
|
||||
|
||||
import com.ablia.db.ApplParmFull;
|
||||
import com.ablia.db.CRAdapter;
|
||||
|
||||
public class WhitelistCR extends CRAdapter {
|
||||
private long id_whitelist;
|
||||
|
||||
private String descrizione;
|
||||
|
||||
private String ipAddress;
|
||||
|
||||
public WhitelistCR(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public WhitelistCR() {}
|
||||
|
||||
public void setId_whitelist(long newId_whitelist) {
|
||||
this.id_whitelist = newId_whitelist;
|
||||
}
|
||||
|
||||
public void setDescrizione(String newDescrizione) {
|
||||
this.descrizione = newDescrizione;
|
||||
}
|
||||
|
||||
public void setIpAddress(String newIpAddress) {
|
||||
this.ipAddress = newIpAddress;
|
||||
}
|
||||
|
||||
public long getId_whitelist() {
|
||||
return this.id_whitelist;
|
||||
}
|
||||
|
||||
public String getDescrizione() {
|
||||
return (this.descrizione == null) ? "" : this.descrizione.trim();
|
||||
}
|
||||
|
||||
public String getIpAddress() {
|
||||
return (this.ipAddress == null) ? "" : this.ipAddress.trim();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue