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

java.io.IOExceptoin Keysize too big in Windows 2003 Server
How to programmatically add user account to openDS?
Java Concurrency - modern examples, tutorials, excersies, step-by-step apps [closed]
How to zip only .txt file in a folder using java?
Sorting using a comparable class
Specifying Message Persistence for JMS client
Files clearing themselves upon object creation
Design patterns exercise in Java [closed]
SecurityException sending broadcast from Java on OS X
Login to LinkedIn by using username and password failed
Sort related text file in java creating a common index
Playing song one after another causes MP3Extractor error
how to print parsing errors in a textfile while parsing with XERCES
Read URL from a Java program
What should be the architecture/design of a Java EE web application? [closed]
Where is PackageManager.movePackage()?

Categories

HOME
ms-access
log4j
zeromq
c#-4.0
reserved
sd-card
spring-cloud-stream
sqlite3
icloud
baqend
dax
clojurescript
transformation
solaris-10
ab-testing
textfield
custom-wordpress-pages
nas
tibco-mdm
crosstab
javacv
django-storage
web-api-testing
publish
neo4j-spatial
stormpath
junit5
semantic-versioning
karaf
scorm2004
gtrendsr
column-family
subset-sum
openoffice.org
dynamics-crm-2013
unspecified
impersonation
leading-zero
lumberjack
particles.js
email-templates
isbn
galleria
auto-update
errordocument
multipeer-connectivity
paxos
pnotify
dropbox-php
powercli
kbuild
font-size
media-player
sqlbulkcopy
quartz-composer
passport-google-oauth
infix-notation
android-textview
fuzzy-search
gridview-sorting
ubuntu-10.04
qcustomplot
rvest
captivenetwork
bluemix-app-scan
nessus
prerequisites
jmeter-maven-plugin
qdialog
retina
security-testing
varargs
mono-embedding
apache-commons-fileupload
unity3d-gui
composite
graph-api-explorer
bridge.net
system.reflection
device-manager
zend-route
mesa
rebol3
marmalade
xceed-datagrid
resty-gwt
imdbpy
industrial
gridcontrol
hungarian-algorithm
drools-planner
pysimplesoap
dsn
automount
dbproviderfactories
custom-backend
nsdatecomponents
servicehost
appendto
android-sdk-2.1
site.master
h.323
web-application-design
database-management
substrings
sef
simpletest
phonon
mediarss
wsdl.exe
caching-application-block

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