我尝试使用RapidClipseX和MicroStreamDB。
我生成了一个存储,在不同的表对象中导入了不同的数据。
现在,我想读取数据并在RapidClipseX Grid组件中将其可视化。
通过使用MicroStreamDB,我没有像休眠中那样的DAO对象。
我仍然不知道该怎么做。
RapidClipseX文档中也没有样本availabel,而Microstream文档中也没有样本。
我尝试使用以下分配,但仍充满网格。
但是它用大约6000行填充了网格,这仍然是表中的行数。但是每一行都有相同的内容,仍然是db-table中最后保存的行。
(我仍然由文本编辑器检查,MicrostreamDB是否存储了正确的数据。->是的)
private void grid_onAttach(final AttachEvent event)
{
final dataRoot root = dbHandler.getRoot();
this.grid.setDataProvider(DataProvider.ofCollection(root.getAllUmsClassifications()));
}
这是我的旧表类:
package com.opaheinz.rcx_test.dbmodel;
import static javax.persistence.GenerationType.IDENTITY;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import com.rapidclipse.framework.server.resources.Caption;
/**
* msTUmsatzClassification
*/
public class msTUmsatzClassification
{
private Integer id;
private Integer UId;
private Integer pos;
private Integer l2Id;
private Integer l3Id;
private Integer l1Id;
private String rule;
private Date datum;
private double sbetrag;
private double dbetrag;
private Integer fixedCosts;
@Caption("Id")
@Id
@GeneratedValue(strategy = IDENTITY)
@Column(name = "id", unique = true, nullable = false, columnDefinition = "INTEGER")
public Integer getId()
{
return this.id;
}
public void setId(final Integer id)
{
this.id = id;
}
@Caption("UId")
@Column(name = "u_id", nullable = false, columnDefinition = "INTEGER")
public Integer getUId()
{
return this.UId;
}
public void setUId(final Integer UId)
{
this.UId = UId;
}
@Caption("Pos")
@Column(name = "pos", nullable = false, columnDefinition = "INTEGER")
public Integer getPos()
{
return this.pos;
}
public void setPos(final Integer pos)
{
this.pos = pos;
}
@Caption("L2Id")
@Column(name = "L2_id", columnDefinition = "INTEGER")
public Integer getL2Id()
{
return this.l2Id;
}
public void setL2Id(final Integer l2Id)
{
this.l2Id = l2Id;
}
@Caption("L3Id")
@Column(name = "L3_id", columnDefinition = "INTEGER")
public Integer getL3Id()
{
return this.l3Id;
}
public void setL3Id(final Integer l3Id)
{
this.l3Id = l3Id;
}
@Caption("L1Id")
@Column(name = "L1_id", nullable = false, columnDefinition = "INTEGER")
public Integer getL1Id()
{
return this.l1Id;
}
public void setL1Id(final Integer l1Id)
{
this.l1Id = l1Id;
}
@Caption("Rule")
@Column(name = "rule", nullable = false, columnDefinition = "VARCHAR", length = 100)
public String getRule()
{
return this.rule;
}
public void setRule(final String rule)
{
this.rule = rule;
}
@Caption("Datum")
@Temporal(TemporalType.DATE)
@Column(name = "datum", nullable = false, columnDefinition = "DATE", length = 10)
public Date getDatum()
{
return this.datum;
}
public void setDatum(final Date datum)
{
this.datum = datum;
}
@Caption("Sbetrag")
@Column(name = "sBetrag", nullable = false, columnDefinition = "DOUBLE", precision = 22, scale = 0)
public double getSbetrag()
{
return this.sbetrag;
}
public void setSbetrag(final double sbetrag)
{
this.sbetrag = sbetrag;
}
@Caption("Dbetrag")
@Column(name = "dBetrag", nullable = false, columnDefinition = "DOUBLE", precision = 22, scale = 0)
public double getDbetrag()
{
return this.dbetrag;
}
public void setDbetrag(final double dbetrag)
{
this.dbetrag = dbetrag;
}
@Caption("FixedCosts")
@Column(name = "fixedCosts", columnDefinition = "INTEGER")
public Integer getFixedCosts()
{
return this.fixedCosts;
}
public void setFixedCosts(final Integer fixedCosts)
{
this.fixedCosts = fixedCosts;
}
}
以下代码是我的dataRoot:
package com.opaheinz.rcx_test.dbstorage;
import java.util.ArrayList;
import java.util.List;
import com.opaheinz.rcx_test.dbmodel.msTCabinet;
import com.opaheinz.rcx_test.dbmodel.msTCabinetList;
import com.opaheinz.rcx_test.dbmodel.msTUmsatzClassification;
import com.opaheinz.rcx_test.dbmodel.msTgroup;
public class dataRoot
{
private msTCabinet msTCabinet;
private msTCabinetList msTCabinetList;
private msTgroup msTgroup;
private msTUmsatzClassification msTUmsatzClassification;
private final List<msTCabinet> cabinets = new ArrayList<>();
private final List<msTCabinetList> allCabinets = new ArrayList<>();
private final List<msTgroup> allGroups = new ArrayList<>();
private final List<msTUmsatzClassification> allUmsClassifications = new ArrayList<>();
public msTCabinet getMsTCabinet()
{
return this.msTCabinet;
}
public void setMsTCabinet(final msTCabinet msTCabinet)
{
this.msTCabinet = msTCabinet;
}
public List<msTCabinet> getCabinets()
{
return this.cabinets;
}
public msTCabinetList getMsTCabinetList()
{
return this.msTCabinetList;
}
public void setMsTCabinetList(final msTCabinetList msTCabinetList)
{
this.msTCabinetList = msTCabinetList;
}
public List<msTCabinetList> getAllCabinets()
{
return this.allCabinets;
}
public msTgroup getMsTgroup()
{
return this.msTgroup;
}
public void setMsTgroup(final msTgroup msTgroup)
{
this.msTgroup = msTgroup;
}
public List<msTgroup> getAllGroups()
{
return this.allGroups;
}
public msTUmsatzClassification getMsTUmsatzClassification()
{
return this.msTUmsatzClassification;
}
public void setMsTUmsatzClassification(final msTUmsatzClassification msTUmsatzClassification)
{
this.msTUmsatzClassification = msTUmsatzClassification;
}
public List<msTUmsatzClassification> getAllUmsClassifications()
{
return this.allUmsClassifications;
}
}
哪里出了问题,哪里出了问题?
任何帮助/想法/样品将不胜感激。 rgds OpaHeinz
最佳答案
到目前为止,我还没有使用过它。不幸的是,没有更新的文档。我无法将应用程序迁移到X,因为X没有图表。
关于java - RapidClipseX,MicroStreamDB:如何将MicroStream表分配给RapidClipseX网格?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/59489046/