當前位置: 首頁>>代碼示例>>Java>>正文


Java SugarRecord.last方法代碼示例

本文整理匯總了Java中com.orm.SugarRecord.last方法的典型用法代碼示例。如果您正苦於以下問題:Java SugarRecord.last方法的具體用法?Java SugarRecord.last怎麽用?Java SugarRecord.last使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.orm.SugarRecord的用法示例。


在下文中一共展示了SugarRecord.last方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: lastExtendedTest

import com.orm.SugarRecord; //導入方法依賴的package包/類
@Test
public void lastExtendedTest() {
    Float firstObjectFloat = new Float(25F);
    Float lastObjectFloat = new Float(50F);
    save(new FloatFieldExtendedModel(firstObjectFloat));
    save(new FloatFieldExtendedModel(lastObjectFloat));
    FloatFieldExtendedModel model = SugarRecord.last(FloatFieldExtendedModel.class);
    assertEquals(lastObjectFloat, model.getFloat());
}
 
開發者ID:skoumalcz,項目名稱:joogar,代碼行數:10,代碼來源:FirstAndLastTests.java

示例2: lastDeletedRecordExtendedTest

import com.orm.SugarRecord; //導入方法依賴的package包/類
@Test
public void lastDeletedRecordExtendedTest() {
    Float firstObjectFloat = new Float(15F);
    Float secondObjectFloat = new Float(25F);
    Float thirdObjectFloat = new Float(35F);
    Float fourthObjectFloat = new Float(45F);
    save(new FloatFieldExtendedModel(firstObjectFloat));
    save(new FloatFieldExtendedModel(secondObjectFloat));
    save(new FloatFieldExtendedModel(thirdObjectFloat));
    save(new FloatFieldExtendedModel(fourthObjectFloat));
    FloatFieldExtendedModel lastRecord = SugarRecord.findById(FloatFieldExtendedModel.class, 4);
    lastRecord.delete();
    FloatFieldExtendedModel model = SugarRecord.last(FloatFieldExtendedModel.class);
    assertEquals(thirdObjectFloat, model.getFloat());
}
 
開發者ID:skoumalcz,項目名稱:joogar,代碼行數:16,代碼來源:FirstAndLastTests.java

示例3: oneItemExtendedTest

import com.orm.SugarRecord; //導入方法依賴的package包/類
@Test
public void oneItemExtendedTest() {
    save(new FloatFieldExtendedModel(new Float(25F)));
    FloatFieldExtendedModel firstModel = SugarRecord.first(FloatFieldExtendedModel.class);
    FloatFieldExtendedModel lastModel = SugarRecord.last(FloatFieldExtendedModel.class);
    assertEquals(firstModel.getFloat(), lastModel.getFloat());
}
 
開發者ID:skoumalcz,項目名稱:joogar,代碼行數:8,代碼來源:FirstAndLastTests.java

示例4: lastAnnotatedTest

import com.orm.SugarRecord; //導入方法依賴的package包/類
@Test
public void lastAnnotatedTest() {
    Float firstObjectFloat = new Float(25F);
    Float lastObjectFloat = new Float(50F);
    save(new FloatFieldAnnotatedModel(firstObjectFloat));
    save(new FloatFieldAnnotatedModel(lastObjectFloat));
    FloatFieldAnnotatedModel model = SugarRecord.last(FloatFieldAnnotatedModel.class);
    assertEquals(lastObjectFloat, model.getFloat());
}
 
開發者ID:skoumalcz,項目名稱:joogar,代碼行數:10,代碼來源:FirstAndLastTests.java

示例5: lastDeletedRecordAnnotatedTest

import com.orm.SugarRecord; //導入方法依賴的package包/類
@Test
public void lastDeletedRecordAnnotatedTest() {
    Float firstObjectFloat = new Float(15F);
    Float secondObjectFloat = new Float(25F);
    Float thirdObjectFloat = new Float(35F);
    Float fourthObjectFloat = new Float(45F);
    save(new FloatFieldAnnotatedModel(firstObjectFloat));
    save(new FloatFieldAnnotatedModel(secondObjectFloat));
    save(new FloatFieldAnnotatedModel(thirdObjectFloat));
    save(new FloatFieldAnnotatedModel(fourthObjectFloat));
    FloatFieldAnnotatedModel lastRecord = SugarRecord.findById(FloatFieldAnnotatedModel.class, 4);
    SugarRecord.delete(lastRecord);
    FloatFieldAnnotatedModel model = SugarRecord.last(FloatFieldAnnotatedModel.class);
    assertEquals(thirdObjectFloat, model.getFloat());
}
 
開發者ID:skoumalcz,項目名稱:joogar,代碼行數:16,代碼來源:FirstAndLastTests.java

示例6: oneItemAnnotatedTest

import com.orm.SugarRecord; //導入方法依賴的package包/類
@Test
public void oneItemAnnotatedTest() {
    save(new FloatFieldAnnotatedModel(new Float(25F)));
    FloatFieldAnnotatedModel firstModel = SugarRecord.first(FloatFieldAnnotatedModel.class);
    FloatFieldAnnotatedModel lastModel = SugarRecord.last(FloatFieldAnnotatedModel.class);
    assertEquals(firstModel.getFloat(), lastModel.getFloat());
}
 
開發者ID:skoumalcz,項目名稱:joogar,代碼行數:8,代碼來源:FirstAndLastTests.java


注:本文中的com.orm.SugarRecord.last方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。