Example usage for com.liferay.portal.kernel.bean ReadOnlyBeanHandler ReadOnlyBeanHandler

List of usage examples for com.liferay.portal.kernel.bean ReadOnlyBeanHandler ReadOnlyBeanHandler

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.bean ReadOnlyBeanHandler ReadOnlyBeanHandler.

Prototype

public ReadOnlyBeanHandler(Object bean) 

Source Link

Usage

From source file:com.liferay.ruon.model.impl.NetworkModelImpl.java

License:Open Source License

public Network toEscapedModel() {
    if (isEscapedModel()) {
        return (Network) this;
    } else {/*from  w  ww  .  ja  va2  s.  c o m*/
        Network model = new NetworkImpl();

        model.setNew(isNew());
        model.setEscapedModel(true);

        model.setNetworkId(getNetworkId());
        model.setName(HtmlUtil.escape(getName()));
        model.setTtl(getTtl());

        model = (Network) Proxy.newProxyInstance(Network.class.getClassLoader(), new Class[] { Network.class },
                new ReadOnlyBeanHandler(model));

        return model;
    }
}

From source file:com.liferay.ruon.model.impl.PresenceModelImpl.java

License:Open Source License

public Presence toEscapedModel() {
    if (isEscapedModel()) {
        return (Presence) this;
    } else {//from  www .  ja  va2  s. c om
        Presence model = new PresenceImpl();

        model.setNew(isNew());
        model.setEscapedModel(true);

        model.setPresenceId(getPresenceId());
        model.setUserId(getUserId());
        model.setModifiedDate(getModifiedDate());
        model.setNetworkId(getNetworkId());
        model.setOnline(getOnline());

        model = (Presence) Proxy.newProxyInstance(Presence.class.getClassLoader(),
                new Class[] { Presence.class }, new ReadOnlyBeanHandler(model));

        return model;
    }
}

From source file:com.liferay.ruon.model.NetworkClp.java

License:Open Source License

public Network toEscapedModel() {
    if (isEscapedModel()) {
        return this;
    } else {//  w  w  w .  ja v  a 2s.  com
        Network model = new NetworkClp();

        model.setEscapedModel(true);

        model.setNetworkId(getNetworkId());
        model.setName(HtmlUtil.escape(getName()));
        model.setTtl(getTtl());

        model = (Network) Proxy.newProxyInstance(Network.class.getClassLoader(), new Class[] { Network.class },
                new ReadOnlyBeanHandler(model));

        return model;
    }
}

From source file:com.liferay.ruon.model.PresenceClp.java

License:Open Source License

public Presence toEscapedModel() {
    if (isEscapedModel()) {
        return this;
    } else {/*w ww. j ava2s. co  m*/
        Presence model = new PresenceClp();

        model.setEscapedModel(true);

        model.setPresenceId(getPresenceId());
        model.setUserId(getUserId());
        model.setModifiedDate(getModifiedDate());
        model.setNetworkId(getNetworkId());
        model.setOnline(getOnline());

        model = (Presence) Proxy.newProxyInstance(Presence.class.getClassLoader(),
                new Class[] { Presence.class }, new ReadOnlyBeanHandler(model));

        return model;
    }
}

From source file:com.liferay.wol.model.impl.JIRAActionModelImpl.java

License:Open Source License

public JIRAAction toEscapedModel() {
    if (isEscapedModel()) {
        return (JIRAAction) this;
    } else {/*from   w  ww.jav  a 2s . c  om*/
        JIRAAction model = new JIRAActionImpl();

        model.setNew(isNew());
        model.setEscapedModel(true);

        model.setJiraActionId(getJiraActionId());
        model.setJiraUserId(HtmlUtil.escape(getJiraUserId()));
        model.setCreateDate(getCreateDate());
        model.setModifiedDate(getModifiedDate());
        model.setJiraIssueId(getJiraIssueId());
        model.setType(HtmlUtil.escape(getType()));
        model.setBody(HtmlUtil.escape(getBody()));
        model.setJiraGroupName(HtmlUtil.escape(getJiraGroupName()));

        model = (JIRAAction) Proxy.newProxyInstance(JIRAAction.class.getClassLoader(),
                new Class[] { JIRAAction.class }, new ReadOnlyBeanHandler(model));

        return model;
    }
}

From source file:com.liferay.wol.model.impl.JIRAChangeGroupModelImpl.java

License:Open Source License

public JIRAChangeGroup toEscapedModel() {
    if (isEscapedModel()) {
        return (JIRAChangeGroup) this;
    } else {/* w ww  . java 2s .co m*/
        JIRAChangeGroup model = new JIRAChangeGroupImpl();

        model.setNew(isNew());
        model.setEscapedModel(true);

        model.setJiraChangeGroupId(getJiraChangeGroupId());
        model.setJiraUserId(HtmlUtil.escape(getJiraUserId()));
        model.setCreateDate(getCreateDate());
        model.setJiraIssueId(getJiraIssueId());

        model = (JIRAChangeGroup) Proxy.newProxyInstance(JIRAChangeGroup.class.getClassLoader(),
                new Class[] { JIRAChangeGroup.class }, new ReadOnlyBeanHandler(model));

        return model;
    }
}

From source file:com.liferay.wol.model.impl.JIRAChangeItemModelImpl.java

License:Open Source License

public JIRAChangeItem toEscapedModel() {
    if (isEscapedModel()) {
        return (JIRAChangeItem) this;
    } else {//from w  w w  .  j  a  va  2  s .c  o  m
        JIRAChangeItem model = new JIRAChangeItemImpl();

        model.setNew(isNew());
        model.setEscapedModel(true);

        model.setJiraChangeItemId(getJiraChangeItemId());
        model.setJiraChangeGroupId(getJiraChangeGroupId());
        model.setField(HtmlUtil.escape(getField()));
        model.setOldValue(HtmlUtil.escape(getOldValue()));
        model.setOldString(HtmlUtil.escape(getOldString()));
        model.setNewValue(HtmlUtil.escape(getNewValue()));
        model.setNewString(HtmlUtil.escape(getNewString()));

        model = (JIRAChangeItem) Proxy.newProxyInstance(JIRAChangeItem.class.getClassLoader(),
                new Class[] { JIRAChangeItem.class }, new ReadOnlyBeanHandler(model));

        return model;
    }
}

From source file:com.liferay.wol.model.impl.JIRAIssueModelImpl.java

License:Open Source License

public JIRAIssue toEscapedModel() {
    if (isEscapedModel()) {
        return (JIRAIssue) this;
    } else {/*from www  .ja v a 2s  . c o m*/
        JIRAIssue model = new JIRAIssueImpl();

        model.setNew(isNew());
        model.setEscapedModel(true);

        model.setJiraIssueId(getJiraIssueId());
        model.setCreateDate(getCreateDate());
        model.setModifiedDate(getModifiedDate());
        model.setProjectId(getProjectId());
        model.setKey(HtmlUtil.escape(getKey()));
        model.setSummary(HtmlUtil.escape(getSummary()));
        model.setDescription(HtmlUtil.escape(getDescription()));
        model.setReporterJiraUserId(HtmlUtil.escape(getReporterJiraUserId()));
        model.setAssigneeJiraUserId(HtmlUtil.escape(getAssigneeJiraUserId()));
        model.setResolution(HtmlUtil.escape(getResolution()));
        model.setStatus(HtmlUtil.escape(getStatus()));

        model = (JIRAIssue) Proxy.newProxyInstance(JIRAIssue.class.getClassLoader(),
                new Class[] { JIRAIssue.class }, new ReadOnlyBeanHandler(model));

        return model;
    }
}

From source file:com.liferay.wol.model.impl.MeetupsEntryModelImpl.java

License:Open Source License

public MeetupsEntry toEscapedModel() {
    if (isEscapedModel()) {
        return (MeetupsEntry) this;
    } else {/*from ww w . j  av  a 2 s.  c  o  m*/
        MeetupsEntry model = new MeetupsEntryImpl();

        model.setNew(isNew());
        model.setEscapedModel(true);

        model.setMeetupsEntryId(getMeetupsEntryId());
        model.setCompanyId(getCompanyId());
        model.setUserId(getUserId());
        model.setUserName(HtmlUtil.escape(getUserName()));
        model.setCreateDate(getCreateDate());
        model.setModifiedDate(getModifiedDate());
        model.setTitle(HtmlUtil.escape(getTitle()));
        model.setDescription(HtmlUtil.escape(getDescription()));
        model.setStartDate(getStartDate());
        model.setEndDate(getEndDate());
        model.setTotalAttendees(getTotalAttendees());
        model.setMaxAttendees(getMaxAttendees());
        model.setPrice(getPrice());
        model.setThumbnailId(getThumbnailId());

        model = (MeetupsEntry) Proxy.newProxyInstance(MeetupsEntry.class.getClassLoader(),
                new Class[] { MeetupsEntry.class }, new ReadOnlyBeanHandler(model));

        return model;
    }
}

From source file:com.liferay.wol.model.impl.MeetupsRegistrationModelImpl.java

License:Open Source License

public MeetupsRegistration toEscapedModel() {
    if (isEscapedModel()) {
        return (MeetupsRegistration) this;
    } else {//w w  w. jav  a 2s  . c om
        MeetupsRegistration model = new MeetupsRegistrationImpl();

        model.setNew(isNew());
        model.setEscapedModel(true);

        model.setMeetupsRegistrationId(getMeetupsRegistrationId());
        model.setCompanyId(getCompanyId());
        model.setUserId(getUserId());
        model.setUserName(HtmlUtil.escape(getUserName()));
        model.setCreateDate(getCreateDate());
        model.setModifiedDate(getModifiedDate());
        model.setMeetupsEntryId(getMeetupsEntryId());
        model.setStatus(getStatus());
        model.setComments(HtmlUtil.escape(getComments()));

        model = (MeetupsRegistration) Proxy.newProxyInstance(MeetupsRegistration.class.getClassLoader(),
                new Class[] { MeetupsRegistration.class }, new ReadOnlyBeanHandler(model));

        return model;
    }
}