java - RapidClipseX、MicroStreamDB : How to assign MicroStream Table to RapidClipseX Grid?

标签 java rapidclipse microstream

我尝试使用 RapidClipseX 和 MicroStreamDB。 我生成了一个存储,在不同的表对象中导入了不同的数据。 现在我想读取数据并在 RapidClipseX Grid 组件中将其可视化。

通过使用 MicroStreamDB,我没有像 Hibernate 中那样的 DAO 对象。 我仍然不知道该怎么做。 RapidClipseX 文档中也没有可用的示例,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;
}
}

以下代码是我的数据根:

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;
}
}

出了什么问题,问题出在哪里? 任何帮助/想法/ sample 将不胜感激。 rgds 奥帕亨氏

最佳答案

我目前还没有使用过它。不幸的是,没有更新的文档。我无法将我们的应用程序迁移到 X,因为 X 没有图表。

关于java - RapidClipseX、MicroStreamDB : How to assign MicroStream Table to RapidClipseX Grid?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59489046/

相关文章:

java - spring bean 配置中的微流 EmbeddedStorageManager

java - 它是否正确? ThreadPoolExecutor threadPoolExecutor = (ThreadPoolExecutor) Executors.newFixedThreadPool(numThreads);

java - 如果开关不工作

java - Rapidclipse - 使用过滤器在一个屏幕上选择多个窗口

java - 如何修改字段组保存功能?

java - MicroStream用作搜索服务器

java - https配置camel-config.xml

Java 编码实践、运行时异常和此场景

testing - 快速剪辑和测试