package info.puzz.a10000sentences.models;

import com.activeandroid.Model;
import com.activeandroid.annotation.Column;
import com.activeandroid.annotation.Table;

import lombok.Data;
import lombok.ToString;
import lombok.experimental.Accessors;

@Data
@Accessors(chain = true)
@ToString
@Table(name = "sentence")
public class Sentence extends Model {

    @Column(name = "sentence_id", index = true, unique = true, onUniqueConflict = Column.ConflictAction.REPLACE)
    public String sentenceId;

    @Column(name = "collection_id", index = true)
    public String collectionId;

    @Column(name = "known")
    public String knownSentence;

    @Column(name = "target")
    public String targetSentence;

    @Column(name = "status")
    public int status = SentenceStatus.TODO.getStatus();

    @Column(name = "complexity", index = true)
    float complexity;

    public String[] getKnownSentences() {
        return String.valueOf(knownSentence).split("\\|");
    }

    public String getFirstKnownSentence() {
        return getKnownSentences()[0];
    }

    public SentenceStatus getSentenceStatus() {
        return SentenceStatus.fromStatus(status);
    }
}

@@ -905,22 +905,30 @@
         
-return
+String%5B%5D res =
  String.
@@ -964,16 +964,224 @@
 %22%5C%5C%7C%22);%0A
+        if (res.length == 1) %7B%0A            return res;%0A        %7D%0A        for (int i = 0; i %3C res.length; i++) %7B%0A            res%5Bi%5D += String.format(%22 %5B%25d/%25d%5D%22, i+1, res.length);%0A        %7D%0A        return res;%0A
     %7D%0A%0A 

Add sentence alternative counter in list