This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.example.companyHumanResourcesAPI; | |
import org.springframework.boot.SpringApplication; | |
import org.springframework.boot.autoconfigure.SpringBootApplication; | |
@SpringBootApplication | |
public class Application { | |
public static void main(String[] args) { | |
SpringApplication.run(Application.class, args); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.example.companyHumanResourcesAPI.config; | |
import org.example.companyHumanResourcesAPI.dao.CompanyDAO; | |
import org.example.companyHumanResourcesAPI.dao.HumanResourceDAO; | |
import org.example.companyHumanResourcesAPI.domain.Company; | |
import org.example.companyHumanResourcesAPI.domain.HumanResource; | |
import org.example.companyHumanResourcesAPI.mutation.HumanResourceMutation; | |
import org.example.companyHumanResourcesAPI.query.HumanResourceQuery; | |
import org.springframework.context.annotation.Bean; | |
import org.springframework.context.annotation.Configuration; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.example.companyHumanResourcesAPI.mutation; | |
import com.coxautodev.graphql.tools.GraphQLMutationResolver; | |
import org.example.companyHumanResourcesAPI.dao.CompanyDAO; | |
import org.example.companyHumanResourcesAPI.dao.HumanResourceDAO; | |
import org.example.companyHumanResourcesAPI.domain.Company; | |
import org.example.companyHumanResourcesAPI.domain.HumanResource; | |
import java.util.Optional; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.example.companyHumanResourcesAPI.query; | |
import com.coxautodev.graphql.tools.GraphQLQueryResolver; | |
import org.example.companyHumanResourcesAPI.dao.HumanResourceDAO; | |
import org.example.companyHumanResourcesAPI.domain.HumanResource; | |
import java.util.List; | |
import java.util.Optional; | |
public class HumanResourceQuery implements GraphQLQueryResolver { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type HumanResource { | |
id: ID! | |
name: String! | |
age: Int! | |
category: String | |
salary: Float | |
companyId: ID! | |
} | |
# The Root Query for the application |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>org.example</groupId> | |
<artifactId>CompanyHumanResourcesAPI</artifactId> | |
<version>1.0-SNAPSHOT</version> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.ApacheStormTopologyJava.topology; | |
import org.ApacheStormTopologyJava.bolt.AggregatingMessagesBolt; | |
import org.ApacheStormTopologyJava.bolt.FilteringMessageBolt; | |
import org.ApacheStormTopologyJava.bolt.PrintingAggregatedMessagesBolt; | |
import org.ApacheStormTopologyJava.spout.RandomMessageSpout; | |
import org.apache.storm.Config; | |
import org.apache.storm.LocalCluster; | |
import org.apache.storm.topology.TopologyBuilder; | |
import org.apache.storm.topology.base.BaseWindowedBolt; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.ApacheStormTopologyJava.bolt; | |
import org.apache.storm.topology.BasicOutputCollector; | |
import org.apache.storm.topology.OutputFieldsDeclarer; | |
import org.apache.storm.topology.base.BaseBasicBolt; | |
import org.apache.storm.tuple.Tuple; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
public class PrintingAggregatedMessagesBolt extends BaseBasicBolt { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.ApacheStormTopologyJava.bolt; | |
import org.apache.storm.task.OutputCollector; | |
import org.apache.storm.task.TopologyContext; | |
import org.apache.storm.topology.OutputFieldsDeclarer; | |
import org.apache.storm.topology.base.BaseWindowedBolt; | |
import org.apache.storm.tuple.Fields; | |
import org.apache.storm.tuple.Tuple; | |
import org.apache.storm.tuple.Values; | |
import org.apache.storm.windowing.TupleWindow; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.ApacheStormTopologyJava.bolt; | |
import org.apache.storm.topology.BasicOutputCollector; | |
import org.apache.storm.topology.OutputFieldsDeclarer; | |
import org.apache.storm.topology.base.BaseBasicBolt; | |
import org.apache.storm.tuple.Fields; | |
import org.apache.storm.tuple.Tuple; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; |
NewerOlder