From eefa0269a82375cd7c09b5379dd082022172891f Mon Sep 17 00:00:00 2001 From: MaximilianoTabacman Date: Fri, 5 Jan 2024 11:51:26 -0300 Subject: [PATCH] Removed deleted package --- rowan/components/Deployment.ston | 4 +- rowan/components/Tests.ston | 4 +- .../GemstoneRepositoryProviderTest.class.st | 69 --------- source/Sagan-Gemstone-Tests/package.st | 1 - .../GemstoneRepository.class.st | 139 ------------------ ...RepositoryMatchingCriteriaBuilder.class.st | 66 --------- .../GemstoneRepositoryProvider.class.st | 37 ----- source/Sagan-Gemstone/package.st | 1 - 8 files changed, 4 insertions(+), 317 deletions(-) delete mode 100644 source/Sagan-Gemstone-Tests/GemstoneRepositoryProviderTest.class.st delete mode 100644 source/Sagan-Gemstone-Tests/package.st delete mode 100644 source/Sagan-Gemstone/GemstoneRepository.class.st delete mode 100644 source/Sagan-Gemstone/GemstoneRepositoryMatchingCriteriaBuilder.class.st delete mode 100644 source/Sagan-Gemstone/GemstoneRepositoryProvider.class.st delete mode 100644 source/Sagan-Gemstone/package.st diff --git a/rowan/components/Deployment.ston b/rowan/components/Deployment.ston index 181f648..46852ca 100644 --- a/rowan/components/Deployment.ston +++ b/rowan/components/Deployment.ston @@ -7,7 +7,7 @@ RwSimpleProjectLoadComponentV2 { 'Sagan-Core', 'Sagan-Extensions', 'Sagan-Kepler', - 'Sagan-Gemstone' + 'Sagan-GemStone' ], #conditionalPackageMapSpecs : { 'gemstone' : { @@ -16,7 +16,7 @@ RwSimpleProjectLoadComponentV2 { 'Sagan-Core' : { 'symbolDictName' : 'Sagan' }, 'Sagan-Extensions' : { 'symbolDictName' : 'Globals' }, 'Sagan-Kepler' : { 'symbolDictName' : 'Sagan' }, - 'Sagan-Gemstone' : { 'symbolDictName' : 'Sagan' } + 'Sagan-GemStone' : { 'symbolDictName' : 'Sagan' } } } } diff --git a/rowan/components/Tests.ston b/rowan/components/Tests.ston index a7aef94..b285830 100644 --- a/rowan/components/Tests.ston +++ b/rowan/components/Tests.ston @@ -7,7 +7,7 @@ RwSimpleProjectLoadComponentV2 { #packageNames : [ 'Sagan-Core-Tests', 'Sagan-Kepler-Tests', - 'Sagan-Gemstone-Tests' + 'Sagan-GemStone-Tests' ], #conditionalPackageMapSpecs : { 'gemstone' : { @@ -15,7 +15,7 @@ RwSimpleProjectLoadComponentV2 { #packageNameToPlatformPropertiesMap : { 'Sagan-Core-Tests' : { 'symbolDictName' : 'Sagan' }, 'Sagan-Kepler-Tests' : { 'symbolDictName' : 'Sagan' }, - 'Sagan-Gemstone-Tests' : { 'symbolDictName' : 'Sagan' } + 'Sagan-GemStone-Tests' : { 'symbolDictName' : 'Sagan' } } } } diff --git a/source/Sagan-Gemstone-Tests/GemstoneRepositoryProviderTest.class.st b/source/Sagan-Gemstone-Tests/GemstoneRepositoryProviderTest.class.st deleted file mode 100644 index c91f3f6..0000000 --- a/source/Sagan-Gemstone-Tests/GemstoneRepositoryProviderTest.class.st +++ /dev/null @@ -1,69 +0,0 @@ -Class { - #name : 'GemstoneRepositoryProviderTest', - #superclass : 'RepositoryBasedTest', - #category : 'Sagan-GemStone-Tests', - #package : 'Sagan-GemStone-Tests' -} - -{ #category : 'initialization' } -GemstoneRepositoryProviderTest >> setUpRepositoryWith: aConflictCheckingStrategy [ - - extraterrestrials := GemstoneRepositoryProvider new - createRepositoryStoringObjectsOfType: Extraterrestrial - checkingConflictsAccordingTo: aConflictCheckingStrategy. - ships := GemstoneRepositoryProvider new - createRepositoryStoringObjectsOfType: Spaceship - checkingConflictsAccordingTo: aConflictCheckingStrategy -] - -{ #category : 'tests' } -GemstoneRepositoryProviderTest >> testSpaceshipQueryingForPositiveFirepower [ - - | solvalou solgrado zeodalley | - - self setUpRepositoryWithNoConflictChecking. - - solvalou := Spaceship withoutFirepowerNamed: 'Solvalou'. - solgrado := Spaceship named: 'Solgrado' firepower: 7650. - zeodalley := Spaceship withUnlimitedFirepowerNamed: 'Zeodalley'. - - ships store: solvalou. - ships store: solgrado. - ships store: zeodalley. - - self - withAllSpaceshipsMatching: [ :spaceship :builder | - builder isUndefined: spaceship firepower otherwiseSatisfy: spaceship firepower > 0 ] - do: [ :spaceships | - self assertCollection: spaceships hasSameElements: { - solgrado. - zeodalley } - ] -] - -{ #category : 'tests' } -GemstoneRepositoryProviderTest >> testSpaceshipQueryingForZeroFirepower [ - - | solvalou solgrado zeodalley | - - self setUpRepositoryWithNoConflictChecking. - - solvalou := Spaceship withoutFirepowerNamed: 'Solvalou'. - solgrado := Spaceship named: 'Solgrado' firepower: 7650. - zeodalley := Spaceship withUnlimitedFirepowerNamed: 'Zeodalley'. - - ships store: solvalou. - ships store: solgrado. - ships store: zeodalley. - - self - withAllSpaceshipsMatching: [ :spaceship :builder | - builder satisfyingAny: { ( spaceship firepower = 0 ) } ] - do: [ :spaceships | self assertCollection: spaceships hasSameElements: { solvalou } ] -] - -{ #category : 'utility' } -GemstoneRepositoryProviderTest >> withAllSpaceshipsMatching: aMatchingCriteria do: aOneArgBlock [ - - aOneArgBlock value: ( ships findAllMatching: aMatchingCriteria ) -] diff --git a/source/Sagan-Gemstone-Tests/package.st b/source/Sagan-Gemstone-Tests/package.st deleted file mode 100644 index ff36d56..0000000 --- a/source/Sagan-Gemstone-Tests/package.st +++ /dev/null @@ -1 +0,0 @@ -Package { #name : 'Sagan-Gemstone-Tests' } diff --git a/source/Sagan-Gemstone/GemstoneRepository.class.st b/source/Sagan-Gemstone/GemstoneRepository.class.st deleted file mode 100644 index bc21fda..0000000 --- a/source/Sagan-Gemstone/GemstoneRepository.class.st +++ /dev/null @@ -1,139 +0,0 @@ -" -I'm a Gemstone repository. I will keep the managed objects in an collections optimized for Gemstone indexes, and provide transactional semantics. - -I require a working Gemstone connection. -" -Class { - #name : 'GemstoneRepository', - #superclass : 'RepositoryBehavior', - #instVars : [ - 'conflictCheckingStrategy', - 'contents' - ], - #category : 'Sagan-GemStone', - #package : 'Sagan-GemStone' -} - -{ #category : 'instance creation' } -GemstoneRepository class >> checkingConflictsAccordingTo: aConflictCheckingStrategy [ - - ^self new initializeCheckingConflictsAccordingTo: aConflictCheckingStrategy -] - -{ #category : 'instance creation' } -GemstoneRepository class >> withoutCheckingConflicts [ - - ^ self checkingConflictsAccordingTo: DoNotCheckForConflictsStrategy new -] - -{ #category : 'configuring' } -GemstoneRepository >> configureMappingsIn: aBlock [ - - -] - -{ #category : 'private - accessing' } -GemstoneRepository >> conflictCheckingStrategy [ - - ^ conflictCheckingStrategy -] - -{ #category : 'querying' } -GemstoneRepository >> countMatching: aCriteriaOrBlockClosure [ - - ^ contents count: ( self asMatchingCriteria: aCriteriaOrBlockClosure ) -] - -{ #category : 'querying' } -GemstoneRepository >> findAll [ - - ^ contents copy -] - -{ #category : 'querying' } -GemstoneRepository >> findAllMatching: aCriteriaOrBlock [ - - ^ contents select: ( self asMatchingCriteria: aCriteriaOrBlock ) -] - -{ #category : 'querying' } -GemstoneRepository >> findAllMatching: aCriteriaOrBlock sortedBy: aSortFunction [ - - ^ ( self findAllMatching: aCriteriaOrBlock ) sorted: aSortFunction -] - -{ #category : 'initialization' } -GemstoneRepository >> initializeCheckingConflictsAccordingTo: aConflictCheckingStrategy [ - - conflictCheckingStrategy := aConflictCheckingStrategy. - contents := OrderedCollection new -] - -{ #category : 'private - accessing' } -GemstoneRepository >> matchingCriteriaBuilder [ - - ^ GemstoneRepositoryMatchingCriteriaBuilder new -] - -{ #category : 'private - management' } -GemstoneRepository >> purgeAfterCheckingInclusion: aDomainObject [ - - contents remove: aDomainObject ifAbsent: [ - DataInconsistencyFound signal: - ( '<1p> was expected to be found in the contents, but it was not.' expandMacrosWith: - aDomainObject ) - ]. - ^ aDomainObject -] - -{ #category : 'management' } -GemstoneRepository >> purgeAllMatching: aCriteriaOrBlock [ - - contents := contents reject: ( self asMatchingCriteria: aCriteriaOrBlock ) -] - -{ #category : 'private - management' } -GemstoneRepository >> storeAfterCheckingConflicts: aDomainObject [ - - contents add: aDomainObject. - ^ aDomainObject -] - -{ #category : 'management' } -GemstoneRepository >> transact: aBlock [ - - ^ aBlock value -] - -{ #category : 'management' } -GemstoneRepository >> update: aMutableDomainObject executing: aBlock [ - - aBlock value: aMutableDomainObject -] - -{ #category : 'private - management' } -GemstoneRepository >> updateAfterCheckingConflicts: aDomainObject with: anUpdatedDomainObject [ - - self purgeAfterCheckingInclusion: aDomainObject. - [ aDomainObject synchronizeWith: anUpdatedDomainObject ] ensure: [ - self storeAfterCheckingConflicts: aDomainObject ]. - ^ aDomainObject -] - -{ #category : 'querying' } -GemstoneRepository >> withOneMatching: aCriteriaOrBlock do: foundBlock else: noneBlock [ - - ^ contents - detect: ( self asMatchingCriteria: aCriteriaOrBlock ) - ifFound: foundBlock - ifNone: noneBlock -] - -{ #category : 'querying' } -GemstoneRepository >> withOneMatching: aCriteriaOrBlock sortedBy: aSortFunction do: foundBlock else: noneBlock [ - - ^ ( contents sorted: aSortFunction ) - detect: ( self asMatchingCriteria: aCriteriaOrBlock ) - ifFound: foundBlock - ifNone: noneBlock -] diff --git a/source/Sagan-Gemstone/GemstoneRepositoryMatchingCriteriaBuilder.class.st b/source/Sagan-Gemstone/GemstoneRepositoryMatchingCriteriaBuilder.class.st deleted file mode 100644 index bb4b119..0000000 --- a/source/Sagan-Gemstone/GemstoneRepositoryMatchingCriteriaBuilder.class.st +++ /dev/null @@ -1,66 +0,0 @@ -" -I'm an implementation for Gemstone Repositories. -I will try to solve everything using plain messages without any DSL. -" -Class { - #name : 'GemstoneRepositoryMatchingCriteriaBuilder', - #superclass : 'RepositoryMatchingCriteriaBuilder', - #category : 'Sagan-GemStone', - #package : 'Sagan-GemStone' -} - -{ #category : 'identity operations' } -GemstoneRepositoryMatchingCriteriaBuilder >> does: anObjectInRepository equal: anObject [ - - ^ anObjectInRepository = anObject -] - -{ #category : 'string matching' } -GemstoneRepositoryMatchingCriteriaBuilder >> does: aStringInRepository includeSubstring: aString [ - - ^ aStringInRepository includesSubstring: aString -] - -{ #category : 'identity operations' } -GemstoneRepositoryMatchingCriteriaBuilder >> does: objectInRepository notEqual: objectInMemory [ - - ^ objectInRepository ~= objectInMemory -] - -{ #category : 'testing' } -GemstoneRepositoryMatchingCriteriaBuilder >> is: anObject includedIn: aCollection [ - - ^ aCollection includes: anObject -] - -{ #category : 'testing' } -GemstoneRepositoryMatchingCriteriaBuilder >> isUndefined: anObject otherwiseSatisfy: aBooleanExpression [ - "It is assumed anObject will always be defined when in memory. - By defined we refer to any object except nil." - - ^ aBooleanExpression -] - -{ #category : 'boolean operations' } -GemstoneRepositoryMatchingCriteriaBuilder >> satisfying: aBoolean and: aBlock [ - - ^ aBoolean and: aBlock -] - -{ #category : 'boolean operations' } -GemstoneRepositoryMatchingCriteriaBuilder >> satisfying: aBoolean or: aBlock [ - - ^ aBoolean or: aBlock -] - -{ #category : 'boolean operations' } -GemstoneRepositoryMatchingCriteriaBuilder >> satisfyingAll: aBooleanCollection [ - - ^ aBooleanCollection allSatisfy: [ :each | each ] -] - -{ #category : 'boolean operations' } -GemstoneRepositoryMatchingCriteriaBuilder >> satisfyingAny: aBooleanCollection [ - - ^ aBooleanCollection anySatisfy: [ :each | each ] -] diff --git a/source/Sagan-Gemstone/GemstoneRepositoryProvider.class.st b/source/Sagan-Gemstone/GemstoneRepositoryProvider.class.st deleted file mode 100644 index 7076c68..0000000 --- a/source/Sagan-Gemstone/GemstoneRepositoryProvider.class.st +++ /dev/null @@ -1,37 +0,0 @@ -Class { - #name : 'GemstoneRepositoryProvider', - #superclass : 'RepositoryProvider', - #category : 'Sagan-GemStone', - #package : 'Sagan-GemStone' -} - -{ #category : 'building' } -GemstoneRepositoryProvider >> createRepositoryStoringObjectsOfType: aBusinessObjectClass - checkingConflictsAccordingTo: aConflictCheckingStrategy [ - - ^ GemstoneRepository checkingConflictsAccordingTo: aConflictCheckingStrategy -] - -{ #category : 'controlling' } -GemstoneRepositoryProvider >> destroyRepositories [ - - " In memory all repositories are destroyed once the system is shut down " -] - -{ #category : 'controlling' } -GemstoneRepositoryProvider >> prepareForInitialPersistence [ - - -] - -{ #category : 'controlling' } -GemstoneRepositoryProvider >> prepareForShutDown [ - - -] - -{ #category : 'initialization' } -GemstoneRepositoryProvider >> reset [ - - -] diff --git a/source/Sagan-Gemstone/package.st b/source/Sagan-Gemstone/package.st deleted file mode 100644 index 05a9f56..0000000 --- a/source/Sagan-Gemstone/package.st +++ /dev/null @@ -1 +0,0 @@ -Package { #name : 'Sagan-Gemstone' }