Skip to content

Commit

Permalink
Record#hasValue NullValue
Browse files Browse the repository at this point in the history
  • Loading branch information
devezhao committed Apr 11, 2019
1 parent 4199f9d commit f6f7740
Show file tree
Hide file tree
Showing 2 changed files with 235 additions and 37 deletions.
164 changes: 164 additions & 0 deletions src/main/java/cn/devezhao/persist4j/Record.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import java.util.Iterator;

import cn.devezhao.persist4j.engine.ID;
import cn.devezhao.persist4j.engine.NullValue;

/**
* 记录
Expand All @@ -18,73 +19,236 @@
*/
public interface Record extends Cloneable, Serializable {

/**
* 实体
*
* @return
*/
Entity getEntity();

/**
* 编辑用户
*
* @return
*/
ID getEditor();

/**
* 主键
*
* @return
*/
ID getPrimary();

/**
* @param key
* @param value
* @return
*/
Record setID(String key, ID value);

/**
* @param key
* @return
*/
ID getID(String key);

/**
* @param key
* @param values
* @return
*/
Record setIDArray(String key, ID[] values);

/**
* @param key
* @return
*/
ID[] getIDArray(String key);

/**
* @param key
* @param value
* @return
*/
Record setChar(String key, Character value);

/**
* @param key
* @return
*/
Character getChar(String key);

/**
* @param key
* @param value
* @return
*/
Record setString(String key, String value);

/**
* @param key
* @return
*/
String getString(String key);

/**
* @param key
* @param value
* @return
*/
Record setInt(String key, Integer value);

/**
* @param key
* @return
*/
Integer getInt(String key);

/**
* @param key
* @param value
* @return
*/
Record setDouble(String key, Double value);

/**
* @param key
* @return
*/
Double getDouble(String key);

/**
* @param key
* @param value
* @return
*/
Record setDecimal(String key, BigDecimal value);

/**
* @param key
* @return
*/
BigDecimal getDecimal(String key);

/**
* @param key
* @param value
* @return
*/
Record setLong(String key, Long value);

/**
* @param key
* @return
*/
Long getLong(String key);

/**
* @param key
* @param value
* @return
*/
Record setDate(String key, Date value);

/**
* @param key
* @return
*/
Date getDate(String key);

/**
* @param key
* @param value
* @return
*/
Record setBoolean(String key, Boolean value);

/**
* @param key
* @return
*/
Boolean getBoolean(String key);

/**
* @param key
* @param stream
* @return
*/
Record setBinary(String key, InputStream stream);

/**
* @param key
* @return
*/
InputStream getBinary(String key);

/**
* @param key
* @param value
* @return
*/
Record setReader(String key, Reader value);

/**
* @param key
* @param value
* @return
*/
Record setReader(String key, String value);

/**
* @param key
* @return
*/
Reader getReader(String key);

/**
* @param key
* @param value
* @return
*/
Record setObjectValue(String key, Object value);

/**
* @param key
* @return
*/
Object getObjectValue(String key);

/**
* @param key
* @return
*/
boolean hasValue(String key);

/**
* @param key
* @param includeNullValue {@link NullValue}
* @return
* @see #setNull(String)
*/
boolean hasValue(String key, boolean includeNullValue);

/**
* @param key
* @return
*/
Object removeValue(String key);

/**
* @param key
* @return
*/
Object setNull(String key);

/**
* @return
*/
Iterator<String> getAvailableFieldIterator();

/**
* @return
*/
Record clone();
}
Loading

0 comments on commit f6f7740

Please sign in to comment.