-
Notifications
You must be signed in to change notification settings - Fork 160
/
JpaCheckpointData.java
60 lines (48 loc) · 1.56 KB
/
JpaCheckpointData.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/*******************************************************************************
* Copyright (c) 2019 Eurotech and/or its affiliates and others
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Eurotech - initial API and implementation
*******************************************************************************/
package org.eclipse.kapua.job.engine.jbatch.persistence.jpa;
import com.ibm.jbatch.container.persistence.CheckpointData;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.Table;
@Entity(name = "CheckpointData")
@Table(name = "CHECKPOINTDATA")
public class JpaCheckpointData extends AbstractJpaJbatchEntity {
@Id
@Column(name = "id", updatable = false, nullable = false)
private String id;
@Lob
@Column(name = "obj")
private byte[] obj;
public JpaCheckpointData() {
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public byte[] getObj() {
return obj;
}
public void setObj(byte[] obj) {
this.obj = obj;
}
public void setObj(CheckpointData checkpointData) {
setObj(writeObject(checkpointData));
}
public CheckpointData toCheckpointData() {
return readObject(getObj());
}
}