@Entity(value = "elements") @Indexes({ @Index(value = "name") }) public class ElementImpl extends BasicEntityBean implements IElement{ public String type; public String locator; public String method; public int position; public ElementImpl() { this.type = ""; this.locator = ""; this.name = ""; this.method = ""; this.position = 0; } }
/** * Ensure indexes from class annotation * @param mc * @param background */ private void ensureIndexesFromClassAnnotation(MappedClass mc, boolean background) { ArrayList<Annotation> idxs = mc.getAnnotations(Indexes.class); if (idxs != null) for (Annotation ann : idxs) { Indexes idx = (Indexes) ann; if (idx != null && idx.value() != null && idx.value().length > 0) for (Index index : idx.value()) { BasicDBObject fields = QueryImpl.parseFieldsString(index.value(), mc.getClazz(), mapr, !index.disableValidation()); ensureIndex(mc.getClazz(), index.name(), fields, index.unique(), index.dropDups(), index.background() ? index.background() : background, index.sparse() ? index.sparse() : false, index.expireAfterSeconds()); } } }
@Entity(value = "projects") @Indexes({ @Index(value = "name") }) public class ProjectImpl extends BasicTaggableMongoBean implements IProject { @Id ObjectId id = new ObjectId(); /** * serialization */ public ProjectImpl(){ //NO-OP } public ObjectId getId(){ return this.id; } public void setId(String id){ this.id = new ObjectId(id); } @Override public String getIdAsString() { return getId().toString(); } }
@Entity(value = "users") @Indexes({ @Index(value = "login") })
@Entity(value = "teams") @Indexes({ @Index(value = "name") })
@Entity(value = "report.campaigns") @Indexes({ @Index(value = "name, -iteration"), @Index("iteration") }) public class Campaign extends BasicTaggableMongoBean implements ICampaign {
@Entity(value = "report.campaigns") @Indexes({ @Index(value = "name, -iteration"), @Index("iteration") })
@Entity(value = "report.projects") @Indexes({ @Index(value = "name"), @Index("version") }) public class Project extends BasicTaggableMongoBean implements IProject {
@Entity(value = "test") @Indexes({ @Index(value = "name, -runDateTime"), @Index("runDateTime"),
@Entity(value = "report.testplans") @Indexes({ @Index("name"), @Index("version"), @Index("project") })
@Indexes({ @Index(value = "pageName, -runDateTime"), @Index("runDateTime"), @Index("isTemplate") }) public class TestPage extends BasicEntityBean implements IBlock, IRunnableTest, ITestPage {