/** * Constructor that copies the data from an XProperty. * * @param data the XProperty representing this meta-feature in XWiki */ PhenoTipsFeatureMetadatum(StringProperty data) { super(data.getValue()); this.type = Type.valueOf(data.getName().toUpperCase(Locale.ROOT)); }
/** * Constructor that copies the data from an XProperty. * * @param data the XProperty representing this meta-feature in XWiki */ PhenoTipsFeatureMetadatum(StringProperty data) { super(data.getValue()); this.type = Type.valueOf(data.getName().toUpperCase(Locale.ROOT)); }
public Object doInHibernate(Session session) throws HibernateException { Query q = session.createQuery("select s from BaseObject o, StringProperty s where o.className like 'XWiki.XWiki%Rights' and o.id=s.id and (s.name='users' or s.name='groups')"); List lst = q.list(); if (lst.size()==0) return null; List lst2 = new ArrayList(lst.size()); for (Iterator it=lst.iterator(); it.hasNext(); ) { StringProperty sp = (StringProperty) it.next(); LargeStringProperty lsp = new LargeStringProperty(); lsp.setId(sp.getId()); lsp.setName(sp.getName()); lsp.setValue(sp.getValue()); lst2.add(lsp); } for (Iterator it=lst.iterator(); it.hasNext(); ) session.delete(it.next()); for (Iterator it=lst2.iterator(); it.hasNext(); ) session.save(it.next()); return null; } });
try { DBStringListProperty newProperty = new DBStringListProperty(); newProperty.setName(oldProperty.getName()); newProperty.setId(oldProperty.getId());
try { DBStringListProperty newProperty = new DBStringListProperty(); newProperty.setName(oldProperty.getName()); newProperty.setId(oldProperty.getId());
try { DBStringListProperty newProperty = new DBStringListProperty(); newProperty.setName(oldProperty.getName()); newProperty.setId(oldProperty.getId());