Package com.tenio.entity.annotation
Interface IBackup<T>
-
- Type Parameters:
T
- the template class
public interface IBackup<T>
This interface is used for backing up and restoring an object. The object is serialized to a JSON string and can be saved somewhere. Otherwise, a JSON object can be established to the corresponding one.- Author:
- kong
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
backup()
Convert an object data to a JSON dataT
restore()
Convert a JSON data to an object data
-
-
-
Method Detail
-
backup
boolean backup()
Convert an object data to a JSON data- Returns:
- true if it's success, false otherwise
-
restore
T restore()
Convert a JSON data to an object data- Returns:
- an object or null in failed cases
-
-