Package io.lumify.bigtable.model.systemNotification

Examples of io.lumify.bigtable.model.systemNotification.BigTableSystemNotification


        super(modelSession);
    }

    @Override
    public BigTableSystemNotification fromRow(Row row) {
        BigTableSystemNotification notification = new BigTableSystemNotification(new SystemNotificationRowKey(row.getRowKey().getRowKey()));
        ColumnFamily cf = row.get(BigTableSystemNotification.COLUMN_FAMILY_NAME);
        notification.setSeverity(SystemNotificationSeverity.valueOf(Value.toString(cf.get(BigTableSystemNotification.SEVERITY_COLUMN_NAME))));
        notification.setTitle(Value.toString(cf.get(BigTableSystemNotification.TITLE_COLUMN_NAME)));
        notification.setMessage(Value.toString(cf.get(BigTableSystemNotification.MESSAGE_COLUMN_NAME)));
        notification.setStartDate(new Date(Value.toLong(cf.get(BigTableSystemNotification.START_DATE_COLUMN_NAME))));
        Long endDate = Value.toLong(cf.get(BigTableSystemNotification.END_DATE_COLUMN_NAME));
        if (endDate != null) {
            notification.setEndDate(new Date(endDate));
        }
        return notification;
    }
View Full Code Here

TOP

Related Classes of io.lumify.bigtable.model.systemNotification.BigTableSystemNotification

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.