程序包 com.ishop.model

类 MyRecord

java.lang.Object
com.ishop.model.MyRecord
所有已实现的接口:
Serializable

public class MyRecord extends Object implements Serializable
采集商品时使用的商品信息解析对象。
作者:
时克英
另请参阅:
  • 构造器详细资料

    • MyRecord

      public MyRecord()
  • 方法详细资料

    • getColumns

      public Map<String,Object> getColumns()
      Return columns map.
    • setColumns

      public MyRecord setColumns(Map<String,Object> columns)
      Set columns value with map.
      参数:
      columns - the columns map
    • setColumns

      public MyRecord setColumns(MyRecord record)
      Set columns value with MyRecord.
      参数:
      record - the MyRecord object
    • setColumns

      public MyRecord setColumns(String jsonObject)
      Set columns value with JSONObject.
      参数:
      jsonObject - the MyRecord object
    • setColumns

      public <T> MyRecord setColumns(T t)
      Set columns value with Model object.
      类型参数:
      T -
      参数:
      t -
      返回:
    • remove

      public MyRecord remove(String column)
      Remove attribute of this myRecord.
      参数:
      column - the column name of the myRecord
    • remove

      public MyRecord remove(String... columns)
      Remove columns of this myRecord.
      参数:
      columns - the column names of the myRecord
    • removeNullValueColumns

      public MyRecord removeNullValueColumns()
      Remove columns if it is null.
    • keep

      public MyRecord keep(String... columns)
      Keep columns of this record and remove other columns.
      参数:
      columns - the column names of the record
    • keep

      public MyRecord keep(String column)
      Keep column of this record and remove other columns.
      参数:
      column - the column names of the record
    • clear

      public MyRecord clear()
      Remove all columns of this record.
    • set

      public MyRecord set(String column, Object value)
      Set column to record.
      参数:
      column - the column name
      value - the value of the column
    • set

      public MyRecord set(String column, List<MyRecord> valueList)
      Set column to record.
      参数:
      column - the column name
      valueList - the value of the column
    • get

      public <T> T get(String column)
      Get column of any mysql type
    • get

      public <T> T get(String column, Object defaultValue)
      Get column of any mysql type. Returns defaultValue if null.
    • getObject

      public Object getObject(String column)
    • getObject

      public Object getObject(String column, Object defaultValue)
    • getStr

      public String getStr(String column)
      Get column of mysql type: varchar, char, enum, set, text, tinytext, mediumtext, longtext
    • getInt

      public Integer getInt(String column)
      Get column of mysql type: int, integer, tinyint(n) n > 1, smallint, mediumint
    • getLong

      public Long getLong(String column)
      Get column of mysql type: bigint
    • getBigInteger

      public BigInteger getBigInteger(String column)
      Get column of mysql type: unsigned bigint
    • getDate

      public Date getDate(String column)
      Get column of mysql type: date, year
    • getTime

      public Time getTime(String column)
      Get column of mysql type: time
    • getTimestamp

      public Timestamp getTimestamp(String column)
      Get column of mysql type: timestamp, datetime
    • getDouble

      public Double getDouble(String column)
      Get column of mysql type: real, double
    • getFloat

      public Float getFloat(String column)
      Get column of mysql type: float
    • getShort

      public Short getShort(String column)
    • getByte

      public Byte getByte(String column)
    • getBoolean

      public Boolean getBoolean(String column)
      Get column of mysql type: bit, tinyint(1)
    • getBigDecimal

      public BigDecimal getBigDecimal(String column)
      Get column of mysql type: decimal, numeric
    • getBytes

      public byte[] getBytes(String column)
      Get column of mysql type: binary, varbinary, tinyblob, blob, mediumblob, longblob I have not finished the test.
    • getNumber

      public Number getNumber(String column)
      Get column of any type that extends from Number
    • toString

      public String toString()
      覆盖:
      toString 在类中 Object
    • equals

      public boolean equals(Object o)
      覆盖:
      equals 在类中 Object
    • hashCode

      public int hashCode()
      覆盖:
      hashCode 在类中 Object
    • getColumnNames

      public String[] getColumnNames()
      Return column names of this record.
    • getColumnValues

      public Object[] getColumnValues()
      Return column values of this record.
    • toJson

      public String toJson()
      Return json string of this record.