fineract-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pranjal-goswami <...@git.apache.org>
Subject [GitHub] fineract pull request #376: Notification Subsystem
Date Wed, 05 Jul 2017 07:21:20 GMT
Github user pranjal-goswami commented on a diff in the pull request:

    https://github.com/apache/fineract/pull/376#discussion_r125567790
  
    --- Diff: fineract-provider/src/main/java/org/apache/fineract/notification/domain/Topic.java
---
    @@ -0,0 +1,125 @@
    +/**
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements. See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership. The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License. You may obtain a copy of the License at
    + *
    + * http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied. See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +package org.apache.fineract.notification.domain;
    +
    +import javax.persistence.Column;
    +import javax.persistence.Entity;
    +import javax.persistence.Table;
    +import org.apache.fineract.infrastructure.core.api.JsonCommand;
    +import org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom;
    +
    +@Entity
    +@Table(name = "topic")
    +public class Topic extends AbstractPersistableCustom<Long> {
    +	
    +	
    +	@Column(name = "title", unique = true, nullable = false, length = 100)
    +    private String title;
    +	
    +	@Column(name = "enabled", nullable = false)
    +	private Boolean enabled;
    +	
    +	@Column(name = "entity_id", nullable = false)
    +	private Long entityId;
    +	
    +	@Column(name = "entity_type")
    +    private String entityType;
    +	
    +	@Column(name = "member_type")
    +    private String memberType;
    +	
    +	public Topic() {
    +	}
    +	
    +	public Topic(String title, Boolean enabled, Long entityId, String entityType, String
memberType) {
    +		
    +		this.title = title.trim();
    +		this.enabled = enabled;
    +		this.entityId = entityId;
    +		this.entityType = entityType.trim();
    +		this.memberType = memberType.trim();
    +	}
    +
    +	public static Topic fromJson(final JsonCommand command) {
    +
    +		String title = "";
    +		Boolean enabled = null;
    +		Long entityId = 0L;
    +		String entityType = "";
    +		String memberType = "";
    +		
    +		if(command.hasParameter("title")) {
    --- End diff --
    
    Inconsistent indentation



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message