我在我的java后端服务器中使用uuid.因此我需要在房间android中使用该uuid以确保实体正确同步.我知道是否有可能在Android的数据库中的文本字段应用的主键和 文本作为android系统中的PrimaryKey.我想创造这样的东西
@Entity(tableName = CrewColumns.TABLE_NAME)
@TypeConverters(BigDecimalConverter::class)
@JsonIgnoreProperties(ignoreUnknown = true)
class Crew() {
constructor (uuid: String) : this() {
this.uuid = uuid;
}
/**
* The unique ID of the item.
*/
@PrimaryKey
@ColumnInfo(name = CrewColumns.UUID)
var uuid: String = ""
@ColumnInfo(name = CrewColumns.NAME)
var name: String = ""
}
Run Code Online (Sandbox Code Playgroud)
Room(DAO等)会出现问题吗?谢谢.
我使用的是iReport 5.5.0.如何居中对齐条形码组件?
我的jrxml的相关片段如下.
<componentElement>
<reportElement x="0" y="9" width="113" height="36" uuid="a11badb4-7c31-4011-83ae-f287b457939a"/>
<jr:Code128 xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd" textPosition="bottom">
<jr:codeExpression><![CDATA[$F{number}]]></jr:codeExpression>
</jr:Code128>
</componentElement>
Run Code Online (Sandbox Code Playgroud)