java


using java in controller and slick


I want to use java in my playframework controller.
And Want to use slick for persisting data with slick.
I have the evolutions and all ready and slick mapping to a model as well but how to access the model with java?
class processDTO #Inject() (protected val dbConfigProvider: DatabaseConfigProvider) extends HasDatabaseConfigProvider[JdbcProfile]
with ProcessTemplatesComponent {
import driver.api._
private val processTemplates = TableQuery[ProcessTemplates]
def getAll(): Future[List[ProcessTemplatesModel]] = db.run { processTemplates.to[List].result }
}
Well....
YourScalaClass.scala
pakcage yourscalapackage
class YourScalaClass(s: String) {
def doSomethingAndReturnString(): String = "omg :: " + s
}
YourJavaClass.java
package yourjavapackage;
import yourscalapakcage.YourScalaClass;
public class YourJavaClass {
public void do() {
YourScalaClass ysc = new YourScalaClass("lol");
String str = ysc.doSomethingAndReturnString();
System.out.println(str);
}
}

Related Links

Output unit testing results on console using spock junit testing and gradle build system
What is the best way to use a core-java libraries (such as javax.*) that aren't in Android
jaxb2-maven-plugin is giving me a SAXParseException when trying to generate META-INF\sun-jaxb.episode file
Getting a random object from a random amount
Getting Wilson Primes; wont work?
How to trust an applet forever
JPanel scroll tabs won't appear
Jersey Restful failed with error “java.lang.NoSuchMethodException: Could not find a suitable constructor”
Android java : How to send message from server to a specific client any time
How to add new version of Apache Tomcat to configure new server?
HQL, can I parameterize the FROM clause?
Make sure each JAR sees its own classpath resources first
How to use JPA 2.1 #NamedStoredProcedureQueries with void return parameters?
Check if String is more then 60% uppercase
How to update parent class in a jpa single_table inheritance?
Directional #ManyToMany but I'd like one side returns unmodifiable(readonly) set

Categories

HOME
winforms
gitlab
oracle11g
path-finding
platform-builder
dot
infragistics
rdf
packages
c#-2.0
qore
cross-validation
gitpitch
vifm
metatrader4
hex-editors
zebra-printers
serverless-framework
worldwind
footer
flux
predix
jquery-ajaxq
ehcache
extjs5
mmap
captiveportal
dxf
su
semantic-analysis
rst2pdf
contact-form
commit
uiswipegesturerecognizer
rotational-matrices
swift3.0.2
service-discovery
particles.js
android-mediaprojection
import-from-excel
checkboxlist
gpx
sencha-touch-2.3
sas-jmp
apple-news
wso2carbon
qsslsocket
domain-model
lowpass-filter
nstextview
recursive-datastructures
jxcore
sybase-asa
knpmenubundle
mako
sqldf
watchconnectivity
ableton-live
instant
azure-virtual-network
multi-level
mathematica-frontend
mongocsharpdriver
react-native-listview
qgraphicsview
pickadate
nessus
freelancer.com-api
kendonumerictextbox
prerequisites
map-projections
mono-embedding
createprocessasuser
unity5.2.3
geonetwork
formatjs
website-monitoring
android-imagebutton
phalanger
asp.net-web-api-odata
titanium-modules
mesa
has-many-through
heisenbug
uitouch
meteor-velocity
prettify
terminal-services
pyhdf
oam
ms-project-server-2010
spring-io
excel-2003
ora-00911
django-nonrel
isnullorempty
cisco-jtapi
dsn
hosts-file
gnustep
xmlspy
hamachi
invite
yetanotherforum
sproutcore-2
suppress
nhibernate.search
multi-tier
nintendo-ds

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App